2.2. Using namespaces
All namespaces referenced from data objects must be declared in the Xdefinition header.
<xd:def xmlns:xd = "http://www.xdef.org/xdef/4.2"
xmlns:bk = "http://www.book.com"
xd:name = "Books" xd:root = "bk:Inventory" >
<bk:Inventory>
<bk:book xd:xcript = "occurs *"
ISBN = "num(10);" >
<bk:publisher> string(); </bk:publisher>
<bk:year> gYear(); </bk:year>
<bk:price> decimal(); </bk:price>
<bk:author xd:script="occurs *"> string(); </bk:author>
<bk:title> string(); </bk:title>
</bk:book>
</bk:Inventory>
</xd:def>
You can try it
HERE
Note It is also possible to use the "default" namespace without prefix, but this is strictly not
recommended. You should always prefer to declare namespaces with a prefix.