This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Simple Problem
- To: XSL-List at mulberrytech dot com
- Subject: Simple Problem
- From: "Mark Swardstrom" <swards at hotmail dot com>
- Date: Thu, 27 Apr 2000 02:03:31 PDT
- Reply-To: xsl-list at mulberrytech dot com
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