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

Simple Problem

Subject: Simple Problem
From: "Mark Swardstrom" <swards@xxxxxxxxxxx>
Date: Thu, 27 Apr 2000 02:03:31 PDT
Simple Problem
This may be too simple for this group, but here goes...

I'm trying to make a generic XSL script that will take any XML input (I do not know the element names), such as

<root>
 <node>
   <item>data1</item>
   <item2>data2</item3>
 </node>
 <node2>
   <item>data3</item>
   <item2>data4</item3>
   <item3>
     <subItem>data5</subItem>
   </item3>
 </node2>
</root>

And create an HTML format where any element with data would return the 1) local-name, 2) value, and 3) be followed by HTML (in this case a single line separator). Elements without a value (such as <node> here) would not output the local-name, but would output different HTML (a paragraph break).

Such as...
<p>
item: data1<br/>
item2: data2<br/>
</p>
<p>
item: data3<br/>
item2: data4<br/>
<p>
item3: data5<br/>
</p>
</p>

It could be any number of levels deep, but I can be sure that there are no elements with data AND children.

My problem -- I haven't been able to differentiate between nodes with data, and nodes without.

Thanks in advance for your thoughts.

- Mark

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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



Current Thread
  • Simple Problem
    • Mark Swardstrom - Thu, 27 Apr 2000 02:03:31 PDT <=
      • <Possible follow-ups>
      • Ben Robb - Thu, 27 Apr 2000 11:20:08 +0100
      • Kay Michael - Thu, 27 Apr 2000 15:52:44 +0100
      • Kay Michael - Thu, 27 Apr 2000 15:55:54 +0100
      • Ben Robb - Thu, 27 Apr 2000 16:13:49 +0100

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.