xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri.Coleba...@toyota.com.au
Subject RE: bug fix for XPath using Namespace
Date Tue, 22 Jun 2004 00:07:12 GMT
Can I chime in here....  If I have the following xpath:

	declare namespace abc="http://foo.com/foo.xsd"
	.//abc:bar

Then what I want is all elements foo@http://foo.com/foo.xsd.   That means
that I'll select elements from this:

	<something>
		<somethingElse>
			<bar xmlns="http://foo.com/foo.xsd">foobar</bar>
		</somethingElse>
	</something>

Just the same as this:

	<something xmlns:foo="http://foo.com/foo.xsd">
		<somethingElse>
			<foo:bar>foobar</foo:bar>
		</somethingElse>
	</something>

So what I'm saying is that I don't care about the prefixes used in the
document, after all, each node has it own qname and the prefix is just for
us humans.  

Am I missing the point of this discussion?  To me it seems like an
open/shut case.

my 2c
cheers
dim

-----Original Message-----
From: nn [mailto:nnakae@comcast.net] 
Sent: Tuesday, 22 June 2004 4:50 AM
To: xmlbeans-dev@xml.apache.org
Subject: Re: bug fix for XPath using Namespace

Maybe I  need to understand how these context dependent features are used
in XMLBeans application.
I'm assuming it is used only from outside of XML docment.
Although you provide an exmple of XPath which is used as part of XSLT, I
think XMLBeans won't be used that way.

nn

----- Original Message -----
From: "David Waite" <mass@akuma.org>
To: <xmlbeans-dev@xml.apache.org>
Sent: Monday, June 21, 2004 11:02 AM
Subject: Re: bug fix for XPath using Namespace


> The context of an xpath (current position, functions, variables, and
> namespace/prefix mappings) is a function of how the xpath expression is
> used, not of the document it is operating on.
>
> -David Waite
>
> On Jun 21, 2004, at 11:33 AM, nn wrote:
>
> > Cezar,
> > Why is it necessary to make XPath independent from the XmlObject?
> > Typically XPath (XSLT) assumes XML document structure implicitly.
> > Then why do we need to make namespace independent from XmlObject?
> >
> > nn
> >
> >
> > ----- Original Message -----
> > From: "Cezar Andrei" <cezar@bea.com>
> > To: <xmlbeans-dev@xml.apache.org>
> > Sent: Friday, June 18, 2004 7:00 AM
> > Subject: RE: bug fix for XPath using Namespace
> >
> >
> > The problem with this approach is that the user of the selectPath
> > method has
> > to know for sure what prefixes and namespaces are used in the
> > XmlObject.
> >
> > I think the prefixes in xpath expressions a independent from the ones
> > in the
> > document, so this means that the user should provide their own prefix
> > resolver. This resolver can come from the same XmlObject if this is
the
> > intent, but otherwise they should be different.
> >
> > Cezar
> >
> >> -----Original Message-----
> >> From: nn [mailto:nnakae@comcast.net]
> >> Sent: Friday, June 18, 2004 5:49 AM
> >> To: xmlbeans-dev@xml.apache.org
> >> Subject: bug fix for XPath using Namespace
> >>
> >>
> >> Hi,
> >> I think it is important to remove the restriction for not
> >> allowing to use
> >> namespace in complex XPath expression.
> >> (s.t ./po:purchaseOrder/po:shipTo[po:name = 'Helen Zoe']" ).
> >>
> >> Since otherwise, the useful XPath (which is provided by
> >> JAXEN) cannot be
> >> used for most XML data associated with XMLSchema. I thought
> >> this may be a
> >> restriction of JAXEN, but it wasn't.
> >> This fix is relatively simple. I  hope this should be
> >> incorporated in the
> >> release (after reviewed by commiters and tested throughly).
> >>
> >
> > -
---------------------------------------------------------------------
> > To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
> > Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
> >
> >
> > -
---------------------------------------------------------------------
> > To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
> > Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
> >
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
>


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message