Re: newbie XPATH newsgroup ?

"rvj" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
OK

> > I'm not sure about your question,

First of all neither am I !

This is day #6 of my XPath investigations.

What I am trying to understand are the implications of namespaces for XPath
expressions. !!

As I understand it, XPath support two basic namespace approaches

1) Using QNames which in turn define two distinct syntaxes
a) URL based which are  RESOLVABLE because they point to real locations
(versioning)
b) URN based which are abstract references but are essentially UNRESOLVABLE
!

2) Universal/Expanded names which as I understand are NOT XML namespace
recommendations BUT nevertheless are an appendix to the XML Namspace
specification and provide a physical reference for a namespace !!

Universal/Expanded names have NOT  been recommended purely because they are
a little more verbose.

*******************************************************

Thats just the introduction !!!

Now XPATH  (as far as I am concerned )  has nothing to do wish XSL! (XSL and
XSLT are just utilities)

********************************************************
The issue is HOW BEST TO DECLARE XPATH NAMESPACES
********************************************************

Firstly, should it be

a) universal namespaces  OR
b) namespace versioning

So if we take a simple example of multiple namespace document a
non-resolvable XPath expression such as

        /ns1:author/ns2:author

what is the best way of converting this to a resolvable XPath expression

Currently (if you are using the MS parser) you identify the namespaces using
a separate property called SelectNamespaces.

An XPath expression assumes that the  document contains the relevant
namespace declarations

      xpath="/ns1:author[@id='x']/ns2:author[@id='y']"

However resolvable references can be provided (for verification purposes)
using

a) universal/expanded names

      xpath=
"<{http://www.somepath/or/other}author[@id='x']/<{http://www.someotherpath/o
r/other}:author[@id='y']"


b) namespace versioning


xpath="http:/www.namespace1/author[@id='x']/http:/www.namespace2/author[@id=
'y']"

**************************************************************************

Secondly, (and this is off-the-wall stuff), it appears that it would be much
simpler  to declare namespaces using an XML XPATH structure that mimics the
structure of the source document (XML)

For example, lets assume that an XPATH expression COULD also be represented
as an XML structure via an element called XPATH with an attribute called
XPATH.

For example

     <xpath  xpath= "/ns1:author[@id='x']/ns2:author[@id='y']  />

In otherwords instead of parsing a literal string, the parser could accept
an XML structure !

It appears that this is also simpler to declare resolveable XPATH expression
using standard namespace declarations. For example

  <xpath>
        <ns1:author xmlns:ns1="www.namespace1"  xpath="@id='x'">
               <ns2:author xmlns:ns2="www.namespace2" xpath="@id='y'"/>
      <ns1:author>
</xpath>

****************************************************************
Does any of this make sense ?
****************************************************************

BTW The article that has provided the basis of my  confusion is

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml/htm
l/xml05202002.asp

























"Markus Siebeneicher" <[email protected]> wrote in message
news:[email protected]...
> Markus Siebeneicher wrote:
>
> > rvj wrote:
> >
> >> correction : something like
> >>
> >>
> >>>     <ns1:author ns1:author="www.foo1"  xpath="author[@id='x']>
> >>>             <ns2:author ns2:author=www.foo2 xpath="author[@id='y']/>
> >>>      <ns1:author>
> >>>
> >>
> >>
> >> "rvj" <[email protected]> wrote in message
> >> news:[email protected]...
> >>
> >>> I think the correct term is serialized  but really what I am trying to
> >>> understand is XPath with multiple namespaces
> >>>
> >>> For example if you search for an  attribute called 'author' but with
> >>> multiple namespaces. Given
> >>>
> >>>       xpath=   "/ns1:author[@id='x']/ns2:author[@id='y']
> >>>
> >>> is it possible to declare the namespace references in the xpath?
> >>>
> >>> It seems that  a serialized xpath format would make this a lot
> >>> easier to
> >>> read
> >>>
> >>>     <ns1:author ns1:author="www.foo1"  xpath="@id='x'>
> >>>             <ns2:author ns2:author=www.foo2 xpath="@id='y'/>
> >>>      <ns1:author>
> >>>
> >>> Any recommended reading for XPath+multiple namespaces?
> >>>
> >>>
> >>> "rvj" <[email protected]> wrote in message
> >>> news:[email protected]...
> >>>
> >>>> a) is there a XPath newsgroup
> >>>>
> >>>> b) very simply all I want to know is there is a mechanism
> >>>
> >>>
> >>> (exists/proposed)
> >>>
> >>>> for switching between a compact XPath representation and a more
verbose
> >>>
> >>>
> >>> XML
> >>>
> >>>> structured representation ?
> >>>>
> >>>> where
> >>>>
> >>>>   /provider[@id=123]/library[@id=234]/detail[@id=345]/*
> >>>>
> >>>> can be alternatively represented something like
> >>>>
> >>>>       <provider xpath="[@id=123]" >
> >>>>             <library xpath="[@id=234]" >
> >>>>                    <detail xpath="[id=345]/*" />
> >>>>              </library>
> >>>>       </provider>
> >>>>
> >>>>
> >>>
> >>
> >>
> >
> > I'm not sure about your question, but maybe this is a usefull suggestion
> > to your research ->
> > /*[name()='ns1:author'][@id='123']/*[name()='ns2:author'][@id='234']
>
> a proper mailing list about xsl and xpath is definitly the xsl mulberry
> list, (http://www.mulberrytech.com/xsl/xsl-list).


begin 666 attachment.cgi
M=&,O````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````# P-# W-S4`,# P,#<V- `P,# P-S8T`# P,# P,# P,# P
M`# W-#<R-C U-S R`# P-S,Q-0`@-0``````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<B @`&)W````
M````````````````````````````````````8G<`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!T8R]F<F%M97-E="YH=&UL````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````,#$P,#8V- `P,# P-S8T`# P
M,# W-C0`,# P,# P,# T,3<`,#<T-S(V,# S,3(`,#$R,# P`" P````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````'5S=&%R(" `8G<```````````````````````````````````````!B
M=P``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````#PA1$]#5%E012!H
M=&UL(%!50DQ)0R B+2\O5S-#+R]$5$0@2%1-3" T+C Q(%1R86YS:71I;VYA
M;"\O14XB/@H\:'1M;#X\:&5A9#X@/"]H96%D/@H\1E)!3453150^"CQ&4D%-
M12!34D,](F9R86UE+FAT;6PB(&]N;&]A9#TB86QE<G0H)W-U8FUI="!R97-P
M;VYS92!R96-I979E9"!B>2!F<F%M97-E="<I.R(^"CQ.3T9204U%4SX*/&)O
M9'D^(#QH-#X@3F\@9G)A;65S('-U<'!O<[email protected]@@/"]H-#X@/"]B;V1Y
M/@H\+TY/1E)!3453/@H\+T9204U%4T54/@H\+VAT;6P^"@H`````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````=&,O9G)A;64N:'1M; ``````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````# Q,# V-C0`,# P,#<V- `P,# P-S8T`# P,# P
M,# P-#8V`# W-#<R-C U-3 R`# Q,3(W-@`@, ``````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!U<W1A<B @
M`&)W````````````````````````````````````````8G<`````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````\2%1-3#X@/$A%040^/"](14%$/@H@
M/"$M+4)/1%D@;VYL;V%D/2)D;V-U;65N="YG971%;&5M96YT0GE)9"@G<G!C
M)RDN<W5B;6ET*"DB+2T^"B \0D]$63X*/$9/4DT@(&YA;64](G)P8R(@:60]
M(G)P8R(@86-T:6]N/2)H='1P.B\O=V]L9BYS;VQU=&EO;G,N;F5T+G!L+V-G
M:2UB:6XO96-H;RYC9VDB(&UE=&AO9#TB<&]S="(^"CQ(,3Y4:&4@1F]R;3PO
M2#$^"CQT97AT87)E82!N86UE/2)P86-K970B(#X*='EP:6-A;"!F;W)M(&9I
M96QD"CPO=&5X=&%R96$^"CQI;G!U="!T>7!E/2)S=6)M:70B/@H\+T9/4DT^
M"CPO0D]$63X*/"](5$U,/@H*````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````'1C+V5C
M:&\N8V=I````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````P,3 P-C8T`# P,# W-C0`,# P,#<V- `P,# P,# P,#,U- `P-S0W
M,C8P,#$P- `P,3 W,#4`(# `````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````=7-T87(@( !B=P``````````
M`````````````````````````````&)W````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````(R$O=7-R+V)I;B]P97)L"@IU<V4@0T=)('%W+SIS=&%N
M9&%R9"\["@HD<75E<GD@/2!N97<@0T=).PI <&%R<R ]("1Q=65R>2T^<&%R
M86T["G!R:6YT(&AE861E<BP@(CQH=&UL/CQH96%D/CPO:&5A9#X\8F]D>2!O
M;FQO860]7")A;&5R="@G4F5S<&]N<V4@;&]A9&5D)RD[7"(\<#XB.PIF;W)E
M86-H*$!P87)S*7L*<')I;G0@(B1?(#H@(BYP87)A;2@D7RDN(EQN(CL*?0IP
M<FEN=" B/"]P/B(N96YD7VAT;6P["@H`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
9````````````````````````````````````
`
end
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.