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: SV: SV: SV: [ubl-dev] UBL- just how reliable are XSD based syntax checks?


Hi David,

Well, basically this sounds like the processor does exactly as is defined as
being the way to handle this situation in the spec and which I expect my xml
processors to do. Isn't that correct? I know that the problem of having
redefined namespaces in scope and so forth is that a processor needs in one
way or another to follow the namespaces and their qualifiers through the
document, essentially having more copies in memory. 
I thought what you meant, which I might have found useful is that I could
send any xml into CAM and get out a normalized XML, for example if I ran it
against a CAM template that said everything was valid and gave it an option
normalize output then the result of the validated XML was a valid, normalized
XML.

Cheers,
Bryan Rasmussen

-----Oprindelig meddelelse-----
Fra: David RR Webber (XML) [mailto:david@drrw.info]
Sendt: 13. februar 2007 14:45
Til: Bryan Rasmussen
Cc: G. Ken Holman; ubl-dev@lists.oasis-open.org
Emne: 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]