[
Lists Home |
Date Index |
Thread Index
]
> However, when my application receives the 3rd party xml, it
> does not have
> the prefix . Hence when I append the XML file
> <rptTransmit></rptTransmit>,
> will it still be valid even though there is no prefix ns1: as
> it is defined
> in the XSD?
Prefixes are just a local shorthand for a namespace URI, and they have no
significance outside the document (in fact, the element) where they are
defined. There's no need to use the same prefixes in the schema and the
instance document, so long as the namespace URIs match.
(Whoever invented this genuinely believed at the time that they were making
things easy for people).
Michael Kay
http://www.saxonica.com/
|