OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [ubl-dev] Re: [spam] Re: [ubl-dev] XPath expressions in UBL / Signatures


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/</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/</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
 
----
Stephen D Green



On 15 May 2011 11:24, Stephen D Green <stephengreenubl@gmail.com> wrote:
Or there is the alternative of an ABIE, but for XQuery and/or XPath, so
that the backwards compatibility problem with the existing XPath BBIE
is reduced (people can reserve XPath for 1.0 (since XQuery 1.0+ uses
/ is a superset of XPath 2.0+) and the namespaces/prefixes can be
declared inline (without a need for special extra-CCTS supplementary
components).
 
Could look like this (once modelled and then incorporated into schemas):
 
 
<!-- ----------------------------------------------------- -->
<!-- UBL-CommonAggregateComponents-2 -->
<!-- ----------------------------------------------------- -->
 
<!-- ... -->
<!-- addition -->
   <xsd:element name="XmlExpression" type="XmlExpressionType"/>
 
<!-- ... -->
<!-- extension -->
   <xsd:complexType name="DocumentReferenceType">
       <xsd:sequence>
           <xsd:element maxOccurs="1" minOccurs="1" ref="cbc:ID"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cbc:CopyIndicator"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cbc:UUID"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cbc:IssueDate"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cbc:IssueTime"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cbc:DocumentTypeCode"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cbc:DocumentType"/>
           <xsd:element maxOccurs="unbounded" minOccurs="0" ref="cbc:XPath"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cbc:LanguageID"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cbc:LocaleCode"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cbc:VersionID"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cbc:DocumentStatusCode"/>
           <xsd:element maxOccurs="unbounded" minOccurs="0" ref="cbc:DocumentDescription"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cac:Attachment"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cac:ValidityPeriod"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cac:IssuerParty"/>
           <xsd:element maxOccurs="1" minOccurs="0" ref="cac:ResultOfVerification"/>
<!-- addition -->
           <xsd:element maxOccurs="1" minOccurs="0" ref="cac:XmlExpression"/>
       </xsd:sequence>
   </xsd:complexType>
 
 
<!-- ... -->
 
<!-- addition -->
   <xsd:complexType name="XmlExpressionType">
       <xsd:sequence>
           <xsd:element maxOccurs="1" minOccurs="1" ref="cbc:XmlExpressionLanguageID"/>
           <xsd:element maxOccurs="1" minOccurs="1" ref="cbc:XmlExpressionLanguageVersionID"/>
           <xsd:element maxOccurs="unbounded" minOccurs="1" ref="cbc:XmlExpressionString"/>
       </xsd:sequence>
   </xsd:complexType>
 
<!-- alternative addition -->
   <xsd:complexType name="XmlExpressionType">
       <xsd:sequence>
           <xsd:element maxOccurs="1" minOccurs="1" ref="cbc:XmlExpressionCode"/>
           <xsd:element maxOccurs="unbounded" minOccurs="1" ref="cbc:XmlExpressionString"/>
       </xsd:sequence>
   </xsd:complexType>
 
<!-- ... -->
 
 
<!-- ---------------------------------------------- -->
<!-- UBL-CommonBasicComponents-2 -->
<!-- ---------------------------------------------- -->
 
<!-- ... -->
 
<!-- additions -->
<!-- needs specification of how to use spec URIs and version IDs for XQuery, etc here -->
 
   <xsd:element name="XmlExpressionLanguageID" type="LanguageIDType"/>
   <xsd:element name="XmlExpressionLanguageVersionID" type="VersionIDType"/>
 
<!-- alternative codified additions -->
<!-- needs a codelist, e.g. XPath2XPath1CompatibilityMode, XQuery1, XPath2, XQuery2, XPath3 ... -->
 
   <xsd:element name="XmlExpressionLanguageCode" type="XmlExpressionLanguageCodeType"/>
<!-- ... -->
   <xsd:complexType name="XmlExpressionLanguageCodeType">
       <xsd:simpleContent>
           <xsd:extension base="udt:CodeType"/>
       </xsd:simpleContent>
   </xsd:complexType>
   
<!-- ... -->
 
 
<!-- addition -->
   <xsd:element name="XmlExpressionString" type="XmlExpressionStringType"/>
 
<!-- ... -->
 
<!-- addition -->
   <xsd:complexType name="XmlExpressionStringType">
       <xsd:simpleContent>
           <xsd:extension base="udt:TextType"/>
       </xsd:simpleContent>
   </xsd:complexType>
 
<!-- ... -->
 
 
Best regards
 
Steve
----
Stephen D Green
 
 
 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]