RE: Questions about c14n implementation

Christian,

> >> 2. Question: How did you check the 3rd processor requirement:
> >> "Implementations MUST NOT be implemented with an XML parser that
> >> converts relative URIs to absolute URIs." . How should a parser (like
> >> Xerces) convert a URI? Does a parser understands what a URI is?
> 
> > Don't know about a parser but a schema verifier would, I think.
> > If it knows that some attribute value is a URI, who knows what
> > it might do to it... knowledge can be a dangerous thing.
> 
> OK, this relates to Schema. My question is:
> 
> Do we have some test vectors (like 3.1-3.7 examples in the c14n 
> spec) that 
> define the correct behaviour? I'm looking for test vectors 
> (correct and bad 
> ones) that allow me to ensure functionality of my implementation. For 
> instance I want to ensure that an input like
> 
> <absolute:correct      
> xmlns:absolute='http://www.absolute.org/#likeVodka'>
> <relative:incorrect    xmlns:relative='../cheating#away'>
> </relative:incorrect>
> </absolute:correct>
> 
> throws an CanonicalizationException because of the use of 
> relative URIs. Do 
> we have something like this for the above topic?
> 
> Question to IBM and IAIK: How did you test this behaviour?

Our C14n implementation scans through all namespace nodes of the input
nodeset and tests if any of them has a relative URI as its value. If
yes, a C14N exception will be thrown.

Obviously it cannot be tested if the underlying parser convertes relative 
in absolute namespace URIs. This has to be tested seperatly with the 
employed parser. We use Xerces, and Xerces does no conversion.

Regards, Gregor

Received on Monday, 30 July 2001 11:53:54 UTC