Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - using in xml namespace defined in schema [Thread Next] Re: using in xml namespace defined in schemaTo: NULL Date: 7/1/2004 10:21:00 AM
Dominique wrote:
> I want to use a namespace in an XML file, that I have created in the
> schema for this xml file. do i have to redefine this namespace in the
> xml file? or is there a way to re-use the definition from the schema?
If your schema declares that an element has to be in a certain namespace
e.g. if you use
<xs:schema
targetNamespace="http://example.com/2004/07/kibology"
elementFormDefault="qualified"
...>
then of course your instance XML document needs to use that namespace by
declaring a prefix for it e.g.
<ki:root
xmlns:ki="http://example.com/2004/07/kibology">...</ki:root>
or use the namespace as the default namespace e.g.
<root xmlns="http://example.com/2004/07/kibology">...</root>
--
Martin Honnen
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
