[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [ubl-dev] XPath expressions in UBL / Signatures
Yes, what you have is certainly unambiguous. It could also be seen as redundant. The namespace declarations in scope also happen to declare the prefixes you've declared in the XQuery prologue. However, I think you have convinced me that in fact explicit prefix/namespace associations are mandatory as information (not as syntax), and I likely wouldn't have come to this conclusion without seeing your example. The way to see this as not redundant is our premise all along in UBL (and in XML) that instance prefixes are arbitrary. As soon as I put a requirement on in-scope namespace declarations, I've just broken that allowance. If I process a UBL document, and in that process I munge the namespace prefixes into other prefixes that are still valid prefixes, all of a sudden the XPath field value is rendered irresolvable because the in-scope namespace declarations are no longer in alignment with the data content. But not in your example. Your example is very helpful. However, for expression languages that do not include explicit namespace declarations (e.g. XPath and not the XQuery superset), one would need a repeating ASBIE of a prefix/namespace pair ABIE, with which a downstream process can unambiguously interpret the prefixes used in the given expression. And it means the existing simple XPath expression BBIE has a built-in assumption about in-scope namespace bindings. But ... this is all speculation until someone identifies a need with an official comment to the UBL committee for consideration. According to the committee meeting minutes, public review draft 2 should be out soon ... a good opportunity to submit comments. Thanks, Steve. . . . . . . . . . . Ken At 2011-05-15 15:01 +0100, Stephen D Green wrote: >This would give ( in some hypothetical future UBL version 2.x - not >in existing UBL ) a way to include an adequately declared XPath 2.0 >in a UBL document: > > ><cac:XmlExpression> ><cbc:XmlExpressionLanguageID><http://www.w3.org/TR/xquery/>http://www.w3.org/TR/xquery/</cbc:XmlExpressionLanguageID> ><cbc:XmlExpressionLanguageVersionID>1.0</cbc:XmlExpressionLanguageVersionID> ><cbc:XmlExpressionString>declare default element namespace >"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"; declare >namespace cbc = >"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"; >(/Invoice/cbc:ID)[1]</cbc:XmlExpressionString> ></cac:XmlExpression> > > >However, since XQuery itself allows the version information to be >declared in the expression itself, maybe the >XmlExpressionLanguageVersionID could be optional and that version >information included in the XQuery expession: > > ><cac:XmlExpression> ><cbc:XmlExpressionLanguageID><http://www.w3.org/TR/xquery/>http://www.w3.org/TR/xquery/</cbc:XmlExpressionLanguageID> ><cbc:XmlExpressionString>xquery version "1.0"; declare default >element namespace >"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"; declare >namespace cbc = >"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"; >(/Invoice/cbc:ID)[1]</cbc:XmlExpressionString> ></cac:XmlExpression> > > >Best regards > >Steve -- Contact us for world-wide XML consulting & instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/u/ G. Ken Holman mailto:gkholman@CraneSoftwrights.com Legal business disclaimers: http://www.CraneSoftwrights.com/legal
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]