Semantic Web Technologies: XML, RDF, OWL
xmlns
attribute:<x xmlns="http://www.w3.org/TR/REC-html40" xmlns:edi="http://ecommerce.org/schema"> <!-- the "edi" prefix is bound to http://ecommerce.org/schema for the "x" element and contents --> <edi:price units="Euro">32</edi:price> <lineItem edi:taxClass="exempt">Baby food</lineItem> </x>
edi
is called the namespace prefix.x
element
any tag tagname
that is appears as
edi:tagname
will be considered part of the
edi
schema.<?xml version="1.0"?> <!-- initially, the default namespace is "books" --> <book xmlns="urn:loc.gov:books" xmlns:isbn="urn:ISBN:0-395-36341-6"> <title>Cheaper by the Dozen</title> <isbn:number>1568491379</isbn:number> <notes> <!-- make HTML the default namespace for some commentary --> <p xmlns="urn:w3-org-ns:HTML"> This is a <i>funny</i> book! </p> </notes> </book>
6 of 41