[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Alternatives for new specifications of context
Hi folks,
Okay, before I make my code changes I'd like to address Paul's two
concerns regarding duplicate element/attribute names, and two ways to
specify context.
Here is the status quo, where the first is an attribute (the others
are elements)document-wide, the second is a union, the third is
typical, the fourth needs more specific context than the third, the
fifth is document-wide and a union:
A:
<Contexts>
<Context item="@currencyID" values="currency"/>
<Context item="cbc:CountrySubentityCode"
context="cac:BuyerCustomerParty"
values="provinces states"/>
<Context item="cbc:CountrySubentityCode"
context="cac:SellerSupplierParty"
values="states"/>
<Context item="cbc:ID" xpath="cac:TaxCategory/cbc:ID"
values="tax-ids"/>
<Context item="cbc:PaymentMeansCode"
values="payments additional_payments"/>
</Contexts>
Option B: - changing only the element names to avoid ambiguity:
<Associations>
<Association item="@currencyID" values="currency"/>
<Association item="cbc:CountrySubentityCode"
context="cac:BuyerCustomerParty"
values="provinces states"/>
<Association item="cbc:CountrySubentityCode"
context="cac:SellerSupplierParty"
values="states"/>
<Association item="cbc:ID" xpath="cac:TaxCategory/cbc:ID"
values="tax-ids"/>
<Association item="cbc:PaymentMeansCode"
values="payments additional_payments"/>
</Associations>
Option C: - removing context= (necessitating xpath= when not full
document context) and keeping <Context>:
<Contexts>
<Context item="@currencyID" values="currency"/>
<Context item="cbc:CountrySubentityCode"
xpath="cac:BuyerCustomerParty//cbc:CountrySubentityCode"
values="provinces states"/>
<Context item="cbc:CountrySubentityCode"
xpath="cac:SellerSupplierParty//cbc:CountrySubentityCode"
values="states"/>
<Context item="cbc:ID" xpath="cac:TaxCategory/cbc:ID"
values="tax-ids"/>
<Context item="cbc:PaymentMeansCode"
values="payments additional_payments"/>
</Contexts>
To recap the need for item=, recall that an application needs to know
the name of the focus information item and whether or not it is an
attribute. This cannot easily be distilled from the XPath address in
the event the XPath address has predicates or multiple steps. One of
the reasons I came up with context= was to avoid having to enter the
focus item's name twice, for fear that it left open the opportunity
for typographical errors (which is still a risk for xpath= but that
would be used far less than context=).
My personal preference is A, then B, then C.
Can I get feedback on this as soon as possible, please, so that I can
finish up the documentation?
Thanks!
. . . . . . . . . . . . Ken
--
Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds: publicly-available developer resources and training
G. Ken Holman mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/m/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/m/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]