[jdom-interest] prefixes in attribute values or element conte
nt(was the hashcode thread)
philip.nelson at omniresources.com
philip.nelson at omniresources.com
Sat Jun 2 16:07:02 PDT 2001
> NO! I don't believe such cases exist. There is always a context! I'm
> not familiar with WSDL but let's look at the other two. I'll show you
> exactly what the context is and what URI it assigns:
>
I think we agree on this.
> >XSLT
> > <some-xsl-element xmlns:foo="http://foo.org/">
> > <value-of select="foo/bar/foo:baz"/>
> > </some-xsl-element>
> >
>
> In this case the value-of element is inside the some-xsl-element. It
> is in the control of the context of that element. The foo prefix is
> mapped to the URI http://foo.org/
You are correct if you say I don't understand XSLT very well, but this
example (from Bob M.) and your response agree with what I think to be true
here and in WSDL. The *application* has a defined context to decode the
prefix to a uri.
>
> >
> >XML Schema
> > <anElement type="xsd:float" />
<snip>
> The context is provided by the root element. It bhinds the prefix xsd
> to the namespace URI http://www.w3.org/2000/10/XMLSchema.
Same in WSDL. The namespaces are declared with prefixes in the definitions
element.
>
> There is no such thing as a namespace prefix out of context in a
> namespace well-formed XML document. We long ago decided that
> non-namespace well-formed documents were out of scope for JDOM.
>
Ah, but an attribute value? Would that make it non namespace compliant?
Not from the point of view of the parser, only to the application using the
attribute.
> We do need some straight-forward way of getting the URL assigned to a
> namespace prefix, but such a question can only be answered in the
> context of a particular element.
All true. I think the only disagreement then may be if an application has a
right to specify which element that is. In your counter to my first WSDL
example, you wanted to be able to redefine a prefix/uri mapping in the
element where the attribute value occured.
More information about the jdom-interest
mailing list