[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] select nodes with an attribute not contained within an excluding attribute


Subject: RE: [xsl] select nodes with an attribute not contained within an excluding attribute
From: "Alan Flaherty" <alan@xxxxxxxxxxxxxxxxxx>
Date: Wed, 8 Oct 2003 14:56:19 +0100

Was looking for the XPath, sorry, didn't explicitly say that in the
original.

However i did get it working

//*[not(ancestor::*[@TemplateId])]/@id

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of John Marshall
Sent: 08 October 2003 14:19
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] select nodes with an attribute not contained within
an excluding attribute


Will

  <xsl:apply-templates select="row[@TemplateId!='TemplateRow']"/>

do it?

John Marshall
Accurate Software

80 Peach Street, Wokingham, Berkshire, RG40 1XH, UK.
Tel: +44 (0)118 977 3889
Fax: +44 (0)118 977 1260
http://www.accuratesoftware.com <http://www.accuratesoftware.com>




-----Original Message-----
From: Alan Flaherty [mailto:alan@xxxxxxxxxxxxxxxxxx]
Sent: 08 October 2003 12:01
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] select nodes with an attribute not contained within an
excluding attribute


Hi List,

I have the following sample XML case:
<doc>
	<paragraph id="Intro">

	</paragraph>
	<table>
		<row>
			<chunk id="HeaderText"/>
		</row>

		<row TemplateId="TemplatedRow">
			Item1: <chunk id="Item1"/> Item2: <chunk id="Item2"/>
		</row>

		<row>
			<chunk id="FooterText"/>
		</row>
	</table>
	<paragraph TemplateId="Quotes">
		<chunk id="QuoteHeader"/><newline/>
		<chunk id="QuoteBody"/>
	</paragraph>
	<paragraph id="Finish">

	</paragraph>
</doc>

I need to be able to *Any* elements with an Id attribute not contained
within *any* element with a TemplateId Attribute, templated items are
reported on separately.

The Idea is that the TemplateId'd elements are bound to a Data Source but
the others are not, at times it's easier to Load up the document and gather
all the non template bound Id's using the processing code just before I bind
the data to the documents rather than having to do this manually. There are
quite a few documents and this will make it all a little bit faster to do.

Regards,

Alan



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




Accurate Software

info@xxxxxxxxxxxxxxxxxxxx
www.accuratesoftware.com

Europe . North America . Australasia . Africa

The information in this email is confidential and privileged and is intended
only for the use of the individual or entity listed above.  If you are
neither the intended individual, or entity listed above, nor the person
responsible for the delivery of this email to the intended recipients, you
are hereby notified that any unauthorised distribution, copying or use of
this email is prohibited. If you have received this email in error, please
notify the Accurate system manager at postmaster@xxxxxxxxxxxxxxxxxxxx or on
+44 (0)118 977 3889.  The views expressed in this communication may not
necessarily be the views held by the Accurate Group.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords