Project

Profile

Help

namespace prefix question

Added by Anonymous about 19 years ago

Legacy ID: #3095224 Legacy Poster: marcvc (marcvc)

Michael, consider the following query: declare namespace dummy = "uri"; element {fn:QName("http://www.w3.org/2001/XMLSchema&quot;,&quot;p:e&quot;)} {"p:integer"} , element {fn:QName("uri","p:e")} {()} It evaluates to: <xs:e xmlns:xs="http://www.w3.org/2001/XMLSchema&quot;&gt;p:integer&lt;/xs:e> <dummy:e xmlns:dummy="uri"/> The prefixes in the result are somehow suprising to me. Thanks, Marc


Replies (2)

RE: namespace prefix question - Added by Anonymous about 19 years ago

Legacy ID: #3095748 Legacy Poster: Michael Kay (mhkay)

Thanks - the code here hasn't caught up with the effect of the "triples proposal", which means that a value of type xs:QName now retains a prefix. It's a simple change: at line 225 of net.sf.saxon.instruct.ComputedElement, change prefix = pool.suggestPrefixForURI(uri); if (prefix == null) { prefix = "nsq0"; } to prefix = ((QNameValue)nameValue).getPrefix(); I won't issue a bug on this, though, because it's more of an "unimplemented feature" than a bug. Michael Kay

RE: namespace prefix question - Added by Anonymous about 19 years ago

Legacy ID: #3095761 Legacy Poster: Michael Kay (mhkay)

And the same change needs to be made to net.sf.saxon.instruct.Attribute at line 306. Michael Kay

    (1-2/2)

    Please register to reply