I am using XSL to display one of many XML files to users... in Internet Explorer. Everything is identical in the structure of the each of the XML files except the first/root node. First example:
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="test.xsl"?>
<Signature>
<item>
<line>Penny H</line>
<line>111 Any Street</line>
<line>Anytown, AnyState</line>
<line>Phone: 555-1111</line>
<line>Email: someone@somewhere.com</line>
</item>
<item>
<line>Adam H</line>
<line>111 Any Street</line>
<line>Anytown, AnyState</line>
<line>Phone: 555-1112</line>
<line>Email: someoneelse@somewhere.com</line>
</item>
</Signature>
second example:
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="test.xsl"?>
<Options>
<item>
<line>Ascending</line>
<line>Descending</line>
</item>
<item>
<line>Ordered By State</line>
<line>Ordered By City</line>
<line>Ordered By Last Name</line>
</item>
</Options>
I'd love to use the same XSL file for all the files, and I can get it to build the file exactly the way I want with one exception. Can I display the name of the root node?
Output I want:
Signature:
Penny H
111 Any Street
Anytown, AnyState
Phone: 555-1111
Email: someone@somewhere.com
Adam H
111 Any Street
Anytown, AnyState
Phone: 555-1112
Email: someoneelse@somewhere.com
AND:
Options:
Ascending
Descending
Ordered By State
Ordered By City
Ordered By Last Name
Like I said, I've got everything else displaying, but can't seem to figure out how to retrieve the name of the node i.e., <Signature> to return Signature and <Option> to return Option.
Thank you for any help!
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="test.xsl"?>
<Signature>
<item>
<line>Penny H</line>
<line>111 Any Street</line>
<line>Anytown, AnyState</line>
<line>Phone: 555-1111</line>
<line>Email: someone@somewhere.com</line>
</item>
<item>
<line>Adam H</line>
<line>111 Any Street</line>
<line>Anytown, AnyState</line>
<line>Phone: 555-1112</line>
<line>Email: someoneelse@somewhere.com</line>
</item>
</Signature>
second example:
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="test.xsl"?>
<Options>
<item>
<line>Ascending</line>
<line>Descending</line>
</item>
<item>
<line>Ordered By State</line>
<line>Ordered By City</line>
<line>Ordered By Last Name</line>
</item>
</Options>
I'd love to use the same XSL file for all the files, and I can get it to build the file exactly the way I want with one exception. Can I display the name of the root node?
Output I want:
Signature:
Penny H
111 Any Street
Anytown, AnyState
Phone: 555-1111
Email: someone@somewhere.com
Adam H
111 Any Street
Anytown, AnyState
Phone: 555-1112
Email: someoneelse@somewhere.com
AND:
Options:
Ascending
Descending
Ordered By State
Ordered By City
Ordered By Last Name
Like I said, I've got everything else displaying, but can't seem to figure out how to retrieve the name of the node i.e., <Signature> to return Signature and <Option> to return Option.
Thank you for any help!