/xml/s:Schema would work but you don't need to nest your XML root
element inside an <xml> element.
-----Original Message-----
From: April Fleming [mailto:AFleming(_at_)dixonusa(_dot_)com]
Sent: Thursday, May 13, 2004 11:05 AM
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: RE: [xsl] two namespaces and a position problem
Strange thing is ... Schema is the top element under the <xml> element,
however if I remove the // or replace it with /s:Schema it does not
work.
That is why I used the //. Not sure of an alternative.
Not sure if it is because this code is inside of
<xsl:template match="rs:data">
and the Schema is in s namespace at top of xml doc.
Example xml
<xml ...>
<s:Schema ..>
<s:ElementType...>
<s:AttributeType..>
...
</s:ElementType>
</s:Schema>
<rs:data>
<z:row...>
....
</z:row>
</rs:data>
</xml>
April Fleming
Information Services
Dixon Ticonderoga Company
407-829-9000 ext. 153
-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk]
Sent: Thursday, May 13, 2004 12:03 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] two namespaces and a position problem
please let me know if you see anything else wrong
since you asked:-)
<xsl:for-each
select="//s:Schema/s:ElementType/s:AttributeType">
Beware // there which means search the whole document, You may know
that s:Schema is always at the top, but XSLT doesn't and will search the
entire document looking for all the s:Schema elements it can find.
It's probably right at the top in which case you want / not //
but even if you have some wrappers round the Schema element it is worth
having a more explict xpath /x/y/z/s:Schema.
David
--
The LaTeX Companion
http://www.awprofessional.com/bookstore/product.asp?isbn=0201362996
http://www.amazon.co.uk/exec/obidos/tg/detail/-/0201362996/202-7257897-0
6198
04
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--