[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] "Skip until"??
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|