This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Dynamic output dependant on existance of other nodes.


Hi all,

I'm trying to create HTML output from this data.

<Data>
  <Item Name="Airport" Type="STR">
   <Val/>
  </Item>
  <Item Name="Airport_choices" Type="STRSEQ">
   <Val>Heathrow</Val>
   <Val>Gatwick</Val>
  </Item>
</Data>

Currently my stylesheet parses for each <Item> Node, and prints out an 
<input> field for each item.

If the Item's 'Type' attribute is STR, then display a textbox, if it is 
STRSEQ, display a pulldown menu.

Now, I need to do some clever processing.  

If Airport_choices exists, and Airport exists, then the menu is 
populated by the contents of Airport_choices and the formfield Name 
attribute is set to "Airport".

If Airport_choices exists, and Airport does not exist, simply display a 
list populated by the contents of Airport Choices and the formfield Name 
attribute is set to "Airport_choices".

This needs to work for combinations of any <itemname>_choice and 
<itemname> pair.

Thanks in advance for your help.

-Ian.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]