[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: SV: SV: [ubl-dev] UBL- just how reliable are XSD based syntax checks?
Bryan, Yes - that's it. However - rather than modifying the original XML - it applies this technique to the structural reference instance that is kept in the CAM template itself. What is powerful about this is that it means the namespaces now can be "overlaid" as it were from the structure onto the XML being processed - so the XML being validated continues in its original state - but now the rule references and process will work correctly. Essentially the processor has two copies in memory - the reference structure and the actual instance - so it can traverse the reference structure and relate that to the instance being validated. Cheers, DW "The way to be is to do" - Confucius (551-472 B.C.) -------- Original Message -------- Subject: SV: SV: [ubl-dev] UBL- just how reliable are XSD based syntax checks? From: "Bryan Rasmussen" <BRS@itst.dk> Date: Tue, February 13, 2007 5:28 am To: "G. Ken Holman" <gkholman@CraneSoftwrights.com>, <ubl-dev@lists.oasis-open.org> I can't be 100% certain but I suppose what is meant that CAM can be used to normalize namespace declarations, for example that all declarations are moved to the document element, that conflicting prefixes (in scope or out of scope?) are normalized to the first occurence of the prefix use and that if there is two uses of xmlns="different namespaces here" the first use of a default namespace declaration is the default namespace while the second use has a prefix generated for it? Basically making the XML more readable from a quick pass through a Generic CAM processor was what I was hoping it meant. so that the example from the spec <?xml version="1.0"?> <!-- initially, the default namespace is "books" --> <book xmlns='urn:loc.gov:books' xmlns:isbn='urn:ISBN:0-395-36341-6'> <title>Cheaper by the Dozen</title> <isbn:number>1568491379</isbn:number> <notes> <!-- make HTML the default namespace for some commentary --> <p xmlns='http://www.w3.org/1999/xhtml'> This is a <i>funny</i> book! </p> </notes> </book> becomes <?xml version="1.0"?> <book xmlns='urn:loc.gov:books' xmlns:isbn='urn:ISBN:0-395-36341-6' xmlns:cam1='http://www.w3.org/1999/xhtml'> <title>Cheaper by the Dozen</title> <isbn:number>1568491379</isbn:number> <notes> <cam1:p> This is a <cam1:i>funny</cam1:i> book! </cam1:p> </notes> </book> Cheers, Bryan Rasmussen
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]