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

Check if next tag is ...

Subject: Check if next tag is ...
From: "Anne Kootstra" <anne@xxxxxxxxx>
Date: Fri, 15 Dec 2006 08:37:30 +0100
next tag
The XML file I work with contains records that most of the time have
three unique nodes. However, it is part of the design that one of these
nodes, T in the example, is optional. Here is an example of a file.

<A>
<C>
  <P>AAA</P>
  <T>BBB</T>
  <S>CCC</S>
</C>
<C>
  <P>DDD</P>
  <T>EEE</T>
  <S>FFF</S>
</C>
<C>
  <P>GGG</P>
  <S>HHH</S>
</C>
</A>

The end result I'm aiming for is a rather simpel HTML table:

           P            T            S
C        AAA       BBB       CCC
C        DDD       EEE       FFF
C        GGG         *          HHH
C          ....          ...            ....

The problem I'm having is that I'm trying to test when processing the P
node if the next node is T. If the next node isn't T or if the T node
doesn't exist then use the value * instead. Now I've experiemented with
following-sibling, node() and value but haven't been successful.

Can anyone point me in the direction of a good tutorial or help me out.
My current list of references during development are:
[1] - http://www.zvon.org/xxl/XSLTreference/Output/index.html,
[2] - http://www.dpawson.co.uk/xsl/sect2/sect21.html=20
But these haven't been able to help me do what I want to do.

Any help is welcomed.

Regards,

Anne.

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.