[cddlm] XML Namespaces and references.
Steve Loughran
steve_loughran at hpl.hp.com
Thu Jan 5 07:54:35 CST 2006
Steve Loughran wrote:
>
>
> I've just checked in
>
> -more valid (non-lazy) reference tests
> -new invalid non-lazy reference tests
> -the first refroot tests.
>
> These tests are encoding my (mis?)-understanding of the ref and
> especially refroot bits of the spec. Please check and advise me of any
> errors.
>
> The fun ones are refroot related. I believe the following is valid
> (cddlm-cdl-2005-02-0010)
>
> <cdl:cdl >
> <cdl:configuration xmlns:test1="http://cddlm.org/test1.cdl" >
> <test1:toplevel>
> <test1:value>username</test1:value>
> </test1:toplevel>
> </cdl:configuration>
> <cdl:system xmlns:t1="http://cddlm.org/test1.cdl">
> <app>
> <user cdl:ref="t1:value" cdl:refroot="t1:toplevel"/>
> </app>
> </cdl:system>
> </cdl:cdl>
>
> This uses qnames and resolves against something in cdl:configuration
>
I am now starting to think that XML is invalid. It all depends upon
where QName prefixes are evaluated.
It may be legit to use xmlns prefixes that are only defined in the
context of the destination reference, e.g.
<user cdl:ref="test1:value" cdl:refroot="t1:toplevel"/>
I am going to read up on Xpath and think about this some more.
What is everyone else doing regarding QName prefix lookup during
resolution? There is no coverage of the problem in the specification
itself,.
-steve
More information about the cddlm-wg
mailing list