|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Fwd: querying attribute?Ronald Bourret rpbourret at rpbourret.comWed Mar 18 20:34:10 PST 2009
Thomas R. Jones wrote: >> So it is correct to declare and reference namespace prefixes within >> xquery even though they are not "explicitly" done so in source code? I'm not sure what you mean by "source code". Do you mean the XML document? What XQuery requires is that, after prefixes and the default namespace are resolved, the names in the query must be the same (namespace and element/attribute name) as the names in the XML document in order to have a successful match. >> I'm guessing the parser is handling this natively. The XML source is >> located within an international database and it strips prefix >> declarations within the import triggers. :( Stripping prefix declarations is almost certainly an error -- I'd be curious to hear the reason for it. There are two problems: 1) If the trigger leaves the prefixes in the element and attribute names, the resulting document is namespace invalid, as the prefixes are not declared. 2) If the prefixes are also stripped from the element and attribute names, the resulting document, although namespace valid, is not the same document. Namespaces are used to create two-part names for elements and attributes, and removing half the name (the namespace) is akin to changing the element and attribute names themselves. -- Ron
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






