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

Re: Ignoring Redundancy

Subject: Re: Ignoring Redundancy
From: "Werner, Wolfgang" <mail@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Oct 2004 14:17:46 +0200
xsl ignoring nodes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

select your sorted nodes into a variable, then use xsl:for-each loop
over the contents of the variable and the preceding- or following-sibling::.
This works because xsl:for-each changes the current context, so, in the
loop the context is no longer the source document but the contents of
your variable.

hth,
Wolfgang

michella@xxxxxxx wrote:

| Hello all,
|
| I'm actually trying to design my xsl stylesheet to
|
| 1. Select all /Classes/Class/SADefinition nodes where their @SAObjName
| attribut contains the sequence 'app_'     --> OK
| 2. Sort the result tree according to @SAObjName attribut     --> OK
| 3. Applying the text to each node, but IGNORING ALL REDUNDAND NODES.
| --> not OK
|    (My XML File contains redundancy nodes)
| I guess, the use of "following-sibling" won't help me much in this
| case...
|
| Here is the actual code :
| ...
| <xsl:result-document href="procXml.bat" format="bat">
| 	<xsl:for-each
| select="/Classes/Class/SADefinition[contains(@SAObjName,'app_')]">
| 		<xsl:sort select="@SAObjName"/>
| 		<xsl:if
| test="not(@SAObjName=/following-sibling::*[position()=1]/@SAObjName)">
|
| 			<xsl:text>fop -fo </xsl:text>
| 			<xsl:value-of select="@SAObjName"/>
| 			<xsl:text>.fo -pdf </xsl:text>
| 			<xsl:value-of select="@SAObjName"/>
| 			<xsl:text>.pdf&#13;&#10;</xsl:text>
|
| 		</xsl:if>
| 	</xsl:for-each>
| </xsl:result-document>
| ...
|
|
| Does anyone have an idea on how to solve my problem?
|
| Regards
|
| Lawrence Michel
|
|
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBannqqjaicDyx8o8RAlwlAJ0VBmE3QFIPlkqlicaswzR8P0wD7ACfYafZ
NWXRXo6SvoKcoVkJyneDmeI=
=CAFl
-----END PGP SIGNATURE-----

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.