geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <>
Subject Namespaces, was: XMLBeans for DDs
Date Sat, 21 Feb 2004 13:13:36 GMT
David Jencks wrote:

> BTW, I was thinking some more about the requirement that the plugin 
> supply xpaths including the prefixes representing the namespaces used by 
> the j2ee dd.  There might be an additional problem there beyond the 
> peculiar requirement that the root / ddbean report on the attributes of 
> the actual first element.  I haven't studied the namespace spec closely, 
> but it seems to me that it might be possible to label each element in an 
> instance document with a  different prefix for the same namespace.  This 
> would make it impossible to figure out what xpath to supply to get to 
> any particular element.

The xpaths all refer to elements in the j2ee namespace and so I don't 
think there is any need to qualify them. It is the tool's responsibility 
to make sure that the queries are properly mapped into that namespace.

> <n1:parent xmlns:n1="myuri">
>   <n2:child xmlns:n2="myuri"/>
>   <n3:child xmlns:n3="myuri"/>
> </n1:parent>
> Is this legal xml?  What xpath can you use to find the chlid elements?

Yes. The namespace for all of these is "myuri" but I am not sure how you 
express that in xpath - certainly not in the simplified way 88 shows. 
But I don't think it matters.


View raw message