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

looping through tags in XSL

Subject: looping through tags in XSL
From: "Foster, Justin (IT_Architecture)" <JFoster@xxxxxxxxxxx>
Date: Fri, 14 Jul 2000 09:07:29 -0700
through tags
Hi All.

I have the following problem:

I am trying to generate HTML from XML.  The XML file I am using is acting as
a data repository, where elements follow the same nested structure:

<TECHNOLOGIES>
    <TECHNOLOGY>
      <NAME>Name1</NAME>
      <ASSOCIATE>John Doe</ASSOCIATE>
      <CLASSID>Development</CLASSID>
      <GROUPID>IT Architechure</GROUPID>
      <CATEGORYID>aware</CATEGORYID>
      <GRIDX>200</GRIDX>
      <GRIDY>-75</GRIDY>
      <DESCRIPTION>This is the description of the first name</DESCRIPTION>
    </TECHNOLOGY>
    <TECHNOLOGY>
      <NAME>Name2</NAME>
      <ASSOCIATE>Jane Doe</ASSOCIATE>
      <CLASSID>Business</CLASSID>
      <GROUPID>Database Management</GROUPID>
      <CATEGORYID>aware</CATEGORYID>
      <GRIDX>-23</GRIDX>
      <GRIDY>213</GRIDY>
      <DESCRIPTION>This is the description of the second name</DESCRIPTION>
    </TECHNOLOGY>
</TECHNOLOGIES>

and so on and so forth.

The problem I am having is I want to generate an XSL that will output to
HTML a user-specified amount of these <TECHNOLOGY> nodes with all of its
child nodes in HTML.  I don't know how to specify in XSL how to not just
output to HTML ONE of these nodes; I need to make the output seem
'intelligent' by allowing the user to specify if they want to display one or
many of these different <TECHNOLOGY> nodes with all of its child nodes in
one HTML page.

Of course, to the user all they will see is an HTML page with the specific
information they requested.  I need to make something that will
automatically pull all of the:

<TECHNOLOGY>
	<NAME>First Name</NAME>
</TECHNOLOGY>
<TECHNOLOGY>
	<NAME>Second Name</NAME>
</TECHNOLOGY>

along with all of the other elements...

appear in the drop-down values of a form, or preferably, in a list where the
user can CTRL-click however many they want to display and then click OK.

Everything will be used in the same stylesheet, if at all possible.
Otherwise, is there a way to generate a stylesheet 'on the fly' to have
everything formatted correctly?

Also, all of the different child nodes will appear in a different part of a
table on the HTML page.  Do I have to use a different <xsl:template
match="node goes here"> every time I add a new XML element to the HTML page?


Forgive my newness--I barely knew what XML stood for a week ago and am
taking tutorials as fast as I can.  Any help you could provide is much
appreciated!!!

Justin Foster 
IT Architecture
253-596-3260 office
253-223-3108 mobile


 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.