[jdom-interest] Namespace issues, et al.

Robert Koberg rob at koberg.com
Sun Feb 23 14:00:23 PST 2003


I'm confused :(

This is a bad example, but say you have something like:

<x:html xmlns:x='http://www.w3.org/1999/xhtml'>
  <x:head><x:title>Frobnostication</x:title></x:head>
  <x:body><x:p>Moved to <x:a href='http://frob.com'>here</x:a>.</x:p>
  <x:div>
    <x:key uri="http://frob.com"/>
  </x:div>
  </x:body>
</x:html>

And then in your XML Schema you have (in the body element defintion):

<xs:key name="x_uris">
  <xs:selector xpath=".//x:key"/>
  <xs:field xpath="@uri"/>
</xs:key>
<xs:keyref name="uri_refs" refer="x_uris">
  <xs:selector xpath=".//x:a"/>
  <xs:field xpath="@x:href"/>
</xs:keyref>

You need the namespace on the attribute for the xs:field for the keyref. So it
is in the the same space, right?

sorry about the/my confusion,
-Rob

> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Elliotte Rusty Harold
> Sent: Sunday, February 23, 2003 1:29 PM

> At 12:53 PM -0800 2/23/03, Malachi de AElfweald wrote:
> >One of the examples on http://www.w3.org/TR/xml-names11/
> >is:
> >
> ><?xml version="1.1"?>
> ><!-- elements are in the HTML namespace, in this case by default -->
> ><html xmlns='http://www.w3.org/1999/xhtml'>
> >  <head><title>Frobnostication</title></head>
> >  <body><p>Moved to <a href='http://frob.com'>here</a>.</p></body>
> ></html>
> >
> >So, you all are saying the "href" is not in the
> >http://www.w3.org/1999/xhtml namespace?
>
>
> Yes, that is exactly what we (and the spec) are saying





More information about the jdom-interest mailing list