[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: two namespaces and a position problem

Subject: RE: two namespaces and a position problem
From: April Fleming <AFleming@xxxxxxxxxxxx>
Date: Thu, 13 May 2004 12:30:02 -0400
two namespaces
Actually this data is output from an application, I am just writing the xslt
files to process it.

Thanks everyone for your help.

April Fleming

Information Services

Dixon Ticonderoga Company

407-829-9000 ext. 153


-----Original Message-----
From: Hansen, John [mailto:John.Hansen@xxxxxxxxxx] 
Sent: Thursday, May 13, 2004 12:18 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  two namespaces and a position problem

/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@xxxxxxxxxxxx] 
Sent: Thursday, May 13, 2004 11:05 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE:  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@xxxxxxxxx] 
Sent: Thursday, May 13, 2004 12:03 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  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
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.