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

"Skip until"??

Subject: "Skip until"??
From: "Heiner de Wendt" <H.dewendt@xxxxxxxxx>
Date: Tue, 8 Aug 2000 10:06:05 +0200
name skip
Hello,

this time I've got a real problem ;-)
I've got an XML file like this:

<root>
 <node>name: Smith</node>
 <node>subject: Feedback</node>
 <node>Dontneed: Somestuff</node>
 <node>date: 02-2000</node>
 <node>Somedata: Dontwant</node>
 <node>name: Jones</node>
 <node>Unneeded: Redundance</node>
 <node>subject: Questions</node>
 <node>date: 03-2000</node>
 <node>name: Miller</node>
 <node>Dontwant: Skipthis</node>
 <node>subject: Request</node>
 <node>date: 03-2000</node>
</root>

Now, my XSLT file should be like this:

1. Match all <node> elements
2. If element contains "name:", "subject:" or "date:", then continue 
processing
3. If element contains the unwanted name "Jones" then:
3a. Skip until element contains "name:" again
3b. Process 3 again
4. Show value of element

Most of it isn't very complex, but I have no idea how to realize 
steps 3a and 3b. I've played with call-template, but things just 
didn't work as I wanted.

Here's what I thought of:

<template name="skip">
 <performtheskip/>
</template>

<template match="node">
 <xsl: if test="contains(.,'name:') or contains(.,'subject:') or 
contains(.,'date:')>
  <xsl:if test="contains(.,'Jones')>
   <xsl:call-template name="skip"/>
  </xsl:if>
  <perform-the-above-xsl:if-again/>
 <xsl:value-of select="."/>
 </xsl:if>
</template>

Anyone out there having an idea? :-)

Thanks,

Heiner


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


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.