OASIS Universal Business Language (UBL) TC

 View Only
  • 1.  PRD3 suggestion: sample instances with unconventional namespace prefixes

    Posted 04-02-2011 13:47
    I gather there is a public perception that the UBL committee's *convention* of using namespace prefixes is somehow regarded as a *standard* way of prefixing element names mandated in UBL. Of course this is not the case, but, sadly, this is the perception. In XML any namespace can use any prefix, and at any point in an XML document one of the namespaces may be associated with no prefix (called the default namespace). I feel this warrants supplementing our XML instance directory with the attached four XML-equivalent instances to the UBL-Invoice-2.0-Example.xml found in PRD1 and PRD2. I say "XML-equivalent" because applications should be ignoring prefixes and using only the combination of namespace URI and local-name for each element, regardless of any different use of namespace prefixes. These five instances have very different uses of namespace prefixes, but identical uses of URI/local-name combinations. Every UBL application should treat all five documents as having the identical processed information to work on. They all validate with the UBL schemas. UBL-Invoice-2.0-Example.xml - (PRD1) document element in the default namespace UBL-Invoice-2.0-Example-NS1.xml - no elements in the default namespace UBL-Invoice-2.0-Example-NS2.xml - basics in the default namespace UBL-Invoice-2.0-Example-NS3.xml - aggregates in the default namespace UBL-Invoice-2.0-Example-NS4.xml - embedded and overloaded use of prefixes I have the time to add these to PRD2 if Jon hasn't yet documented the revised set of sample instances, but I'm assuming we just put these in PRD3. However, an argument for *not* including such instances is that it is not the role of the UBL specification to be tutorial in nature. Yet I'm confident such examples will be very useful to UBL users when they can go to their application developers with a set of unconventional documents that are still UBL valid and found in the UBL distribution (thus giving them some legitimacy). Their developers may think the users's applications are ready for the real world, but the real world has many and varied and bizarre ways that namespaces are used. I would like to discuss this on this week's calls. . . . . . . . . . . Ken UBL-Invoice-2.0-Example-NS1.xml UBL-Invoice-2.0-Example-NS3.xml UBL-Invoice-2.0-Example-NS2.xml UBL-Invoice-2.0-Example-NS4.xml -- Contact us for world-wide XML consulting & instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/o/ G. Ken Holman mailto:gkholman@CraneSoftwrights.com Legal business disclaimers: http://www.CraneSoftwrights.com/legal


  • 2.  Re: [ubl] PRD3 suggestion: sample instances with unconventional namespace prefixes

    Posted 04-02-2011 18:16
    Hi Ken, the use of suggested prefixes (cbc, cac, ...), even if not normative, helps a lot for many reasons: 1) If we are going to use SOAP envelopes and WS* there are several namespaces that are in place along with UBL namespaces, so it is very useful to use those prefixes suggested on each specification (even if not normative) 2) by relying on automatic prefixes (n1, n2, nx, ...) generated by tools it is really risky. In PEPPOL we experienced real troubles with JAXB which is seriously bugged with the xs:Any element handling and it is very easy to have duplicated namespace prefixes when you use it. 3) UBL namespace prefixes are providing a more readable document. Hope this helps Roberto > I gather there is a public perception that the UBL committee's > *convention* of using namespace prefixes is somehow regarded as a > *standard* way of prefixing element names mandated in UBL. > > Of course this is not the case, but, sadly, this is the > perception. In XML any namespace can use any prefix, and at any > point in an XML document one of the namespaces may be associated with > no prefix (called the default namespace). > > I feel this warrants supplementing our XML instance directory with > the attached four XML-equivalent instances to the > UBL-Invoice-2.0-Example.xml found in PRD1 and PRD2. I say > "XML-equivalent" because applications should be ignoring prefixes and > using only the combination of namespace URI and local-name for each > element, regardless of any different use of namespace prefixes. > > These five instances have very different uses of namespace prefixes, > but identical uses of URI/local-name combinations. Every UBL > application should treat all five documents as having the identical > processed information to work on. They all validate with the UBL schemas. > > UBL-Invoice-2.0-Example.xml - (PRD1) document element in the default > namespace > UBL-Invoice-2.0-Example-NS1.xml - no elements in the default namespace > UBL-Invoice-2.0-Example-NS2.xml - basics in the default namespace > UBL-Invoice-2.0-Example-NS3.xml - aggregates in the default namespace > UBL-Invoice-2.0-Example-NS4.xml - embedded and overloaded use of prefixes > > I have the time to add these to PRD2 if Jon hasn't yet documented the > revised set of sample instances, but I'm assuming we just put these in > PRD3. > > However, an argument for *not* including such instances is that it is > not the role of the UBL specification to be tutorial in nature. Yet > I'm confident such examples will be very useful to UBL users when > they can go to their application developers with a set of > unconventional documents that are still UBL valid and found in the > UBL distribution (thus giving them some legitimacy). Their > developers may think the users's applications are ready for the real > world, but the real world has many and varied and bizarre ways that > namespaces are used. > > I would like to discuss this on this week's calls. > > . . . . . . . . . . Ken > -- > Contact us for world-wide XML consulting & instructor-led training > Crane Softwrights Ltd. http://www.CraneSoftwrights.com/o/ > G. Ken Holman mailto:gkholman@CraneSoftwrights.com > Legal business disclaimers: http://www.CraneSoftwrights.com/legal > > --------------------------------------------------------------------- > To unsubscribe from this mail list, you must leave the OASIS TC that > generates this mail. Follow this link to all your TCs in OASIS at: > https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php -- * JAVEST by Roberto Cisternino * * Document Engineering Services Ltd. - Alliance Member * UBL Italian Localization SubCommittee (ITLSC), co-Chair * UBL Online Community editorial board member (ubl.xml.org) * Italian UBL Advisor Roberto Cisternino mobile: +39 328 2148123 skype: roberto.cisternino.ubl-itlsc [UBL Technical Committee] http://www.oasis-open.org/committees/ubl [UBL Online Community] http://ubl.xml.org [UBL International Conferences] http://www.ublconference.org [UBL Italian Localization Subcommittee] http://www.oasis-open.org/committees/ubl-itlsc [Iniziativa divulgativa UBL Italia] http://www.ubl-italia.org


  • 3.  Re: [ubl] PRD3 suggestion: sample instances with unconventional namespace prefixes

    Posted 04-02-2011 19:54
    At 2011-04-02 20:16 +0200, Roberto Cisternino wrote: >the use of suggested prefixes (cbc, cac, ...), even if not normative, >helps a lot for many reasons: I *totally* agree, Roberto. >1) If we are going to use SOAP envelopes and WS* there are several >namespaces that are in place along with UBL namespaces, so it is very >useful to use those prefixes suggested on each specification (even if not >normative) Useful, yes, normative, no ... I agree. >2) by relying on automatic prefixes (n1, n2, nx, ...) generated by tools >it is really risky. Oh? It shouldn't be risky in any manner whatsoever. But I'm not sure what you mean by "relying on automatic prefixes". No-one should rely on *any* prefixes ... automatically generated or authored. *That* is the point of my posting the sample documents with unconventional namespace prefixes. They aren't "wrong" and the instances are not invalid ... simply unconventional. Conforming XML-aware software handles *any* correct use of namespaces, conventional or unconventional. If a vendor cannot handle the sample instances that I've posted and treat them as fully conforming UBL documents, then the vendor's software is not XML-namespace-conformant. >In PEPPOL we experienced real troubles with JAXB which >is seriously bugged with the xs:Any element handling and it is very easy >to have duplicated namespace prefixes when you use it. I'm basing my comments solely on the XML and XML Namespaces specifications. Any UBL implementation has to be prepared to accept *any* correct use of XML Namespaces, otherwise it will be left behind in interoperability within the user's community. I cannot comment on whether or not JAXB is XML-namespaces-conformant, as I've never used it. I would be very surprised if it didn't conform, but perhaps the tool creators misunderstood the use of namespaces. >3) UBL namespace prefixes are providing a more readable document. Totally. And when humans read a UBL document, using the documentary conventions we've used in our materials will make it easier for that human to understand what they see. It will be more "readable" as you suggest. But a computer doesn't care what the namespace prefixes are, which is exactly my point. "Readability" isn't an issue for computers, accuracy is. Our UBL users' software must not care what the namespace prefixes are in the document. Hence, those sample instances I'm suggesting we add to the distribution will equip users who hear unfounded claims of conformance from vendors. Roberto, throughout the project I've been recommending for the readability by humans of the specifications that the UBL committee adopt namespace prefix conventions for clarity ... here are just a few citations from way back: http://lists.oasis-open.org/archives/ubl-lcsc/200306/msg00077.html http://lists.oasis-open.org/archives/ubl/200410/msg00002.html http://wiki.oasis-open.org/ubl/Example_Calculation_Models#ns Absolutely we continue our committee's convention of documenting UBL for human eyeballs using a convention for namespace prefixes. These will keep our documents readable by human readers. But absolutely we must not prevent a perfectly conforming UBL document from being machine processed, regardless of what namespace prefixes happen to be used. Thanks for your comments. . . . . . . . . . . . Ken -- Contact us for world-wide XML consulting & instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/o/ G. Ken Holman mailto:gkholman@CraneSoftwrights.com Legal business disclaimers: http://www.CraneSoftwrights.com/legal


  • 4.  Re: [ubl] PRD3 suggestion: sample instances with unconventional namespace prefixes

    Posted 04-03-2011 16:45
    >>2) by relying on automatic prefixes (n1, n2, nx, ...) generated by tools >>it is really risky. >Oh? It shouldn't be risky in any manner whatsoever. But I'm not >sure what you mean by "relying on automatic prefixes". What I meant to say is that using JAXB the use of automatic generated prefixes is discouraged if an xsd:Any element is involved in the marshalling/unmarshalling. Let's say we have a SOAP envelope (outer) and a payload (inner): If I put a payload with a default namespace inside an xsd:Any element with processing "lax" or even "skip", JAXB will add namespaces to the payload using generated prefixes (n1, n2,...) which is really undesired. This bad behaviour produces even duplicated namespace prefixes (same prefix with different namespace uri) if either the SOAP envelope and the payload have been marshalled with JAXB and by relying on generated prefixes. Under this situation it takes to tell JAXB using specific namespace prefixes. This is just to say that generated prefixes are ok, but their usage is just providing confusion to both humans and machines :) Cheers, Roberto -- * JAVEST by Roberto Cisternino * * Document Engineering Services Ltd. - Alliance Member * UBL Italian Localization SubCommittee (ITLSC), co-Chair * UBL Online Community editorial board member (ubl.xml.org) * Italian UBL Advisor Roberto Cisternino mobile: +39 328 2148123 skype: roberto.cisternino.ubl-itlsc [UBL Technical Committee] http://www.oasis-open.org/committees/ubl [UBL Online Community] http://ubl.xml.org [UBL International Conferences] http://www.ublconference.org [UBL Italian Localization Subcommittee] http://www.oasis-open.org/committees/ubl-itlsc [Iniziativa divulgativa UBL Italia] http://www.ubl-italia.org


  • 5.  Re: [ubl] PRD3 suggestion: sample instances with unconventional namespace prefixes

    Posted 04-06-2011 21:21
    I like Ken's suggestion. One purpose of the xml directory is to provide a sort of ad hoc test suite for would-be UBL apps. If there are putative UBL processors that choke on these examples, people need to be aware of that. In fact, I'd like to get these into PRD2 if possible. Jon G. Ken Holman wrote: > I gather there is a public perception that the UBL committee's > *convention* of using namespace prefixes is somehow regarded as a > *standard* way of prefixing element names mandated in UBL. > > Of course this is not the case, but, sadly, this is the perception. In > XML any namespace can use any prefix, and at any point in an XML > document one of the namespaces may be associated with no prefix (called > the default namespace). > > I feel this warrants supplementing our XML instance directory with the > attached four XML-equivalent instances to the > UBL-Invoice-2.0-Example.xml found in PRD1 and PRD2. I say > "XML-equivalent" because applications should be ignoring prefixes and > using only the combination of namespace URI and local-name for each > element, regardless of any different use of namespace prefixes. > > These five instances have very different uses of namespace prefixes, but > identical uses of URI/local-name combinations. Every UBL application > should treat all five documents as having the identical processed > information to work on. They all validate with the UBL schemas. > > UBL-Invoice-2.0-Example.xml - (PRD1) document element in the default > namespace > UBL-Invoice-2.0-Example-NS1.xml - no elements in the default namespace > UBL-Invoice-2.0-Example-NS2.xml - basics in the default namespace > UBL-Invoice-2.0-Example-NS3.xml - aggregates in the default namespace > UBL-Invoice-2.0-Example-NS4.xml - embedded and overloaded use of prefixes > > I have the time to add these to PRD2 if Jon hasn't yet documented the > revised set of sample instances, but I'm assuming we just put these in > PRD3. > > However, an argument for *not* including such instances is that it is > not the role of the UBL specification to be tutorial in nature. Yet I'm > confident such examples will be very useful to UBL users when they can > go to their application developers with a set of unconventional > documents that are still UBL valid and found in the UBL distribution > (thus giving them some legitimacy). Their developers may think the > users's applications are ready for the real world, but the real world > has many and varied and bizarre ways that namespaces are used. > > I would like to discuss this on this week's calls. > > . . . . . . . . . . Ken > > -- > Contact us for world-wide XML consulting & instructor-led training > Crane Softwrights Ltd. http://www.CraneSoftwrights.com/o/ > G. Ken Holman mailto:gkholman@CraneSoftwrights.com > Legal business disclaimers: http://www.CraneSoftwrights.com/legal > > > ------------------------------------------------------------------------ > > --------------------------------------------------------------------- > To unsubscribe from this mail list, you must leave the OASIS TC that > generates this mail. Follow this link to all your TCs in OASIS at: > https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php


  • 6.  Re: [ubl] PRD3 suggestion: sample instances with unconventional namespace prefixes

    Posted 04-07-2011 02:19
    At 2011-04-06 17:20 -0400, Jon Bosak wrote: >In fact, I'd like to get these into PRD2 if possible. Done! What more input to the documentation do you need other than the following? >G. Ken Holman wrote: >>UBL-Invoice-2.0-Example.xml - (PRD1) document element in the >>default namespace >>UBL-Invoice-2.0-Example-NS1.xml - no elements in the default namespace >>UBL-Invoice-2.0-Example-NS2.xml - basics in the default namespace >>UBL-Invoice-2.0-Example-NS3.xml - aggregates in the default namespace >>UBL-Invoice-2.0-Example-NS4.xml - embedded and overloaded use of prefixes . . . . . . . . . Ken -- Contact us for world-wide XML consulting & instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/o/ G. Ken Holman mailto:gkholman@CraneSoftwrights.com Legal business disclaimers: http://www.CraneSoftwrights.com/legal


  • 7.  Re: [ubl] PRD3 suggestion: sample instances with unconventional namespace prefixes

    Posted 04-07-2011 15:21
    G. Ken Holman wrote: > What more input to the documentation do you need other than the following? > >> G. Ken Holman wrote: >>> UBL-Invoice-2.0-Example.xml - (PRD1) document element in the default >>> namespace >>> UBL-Invoice-2.0-Example-NS1.xml - no elements in the default namespace >>> UBL-Invoice-2.0-Example-NS2.xml - basics in the default namespace >>> UBL-Invoice-2.0-Example-NS3.xml - aggregates in the default namespace >>> UBL-Invoice-2.0-Example-NS4.xml - embedded and overloaded use of >>> prefixes I think that will do it. Jon