|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Listing all element/attributes/attribute values
Hi there,
Since someone has probably already done this and I don't want to
reinvent the wheel, I thought I'd ask here.
What I want to do is with any well-formed XML document list all the
elements, attributes and attribute-values in a sorted list.
So given something like:
<div class="foo"><p xml:id="abc123" style="font-weight: bold"
class="big">foo</p>
<span class="foo"><a
href="http://www.example.com/">foo</a></span><span
class="bar">bar</span> <p class="small">small</p></div>
I might get output like:
a (1)
- href
= http://www.example.com/
div (1)
- class
= foo
p (2)
- class
= big
= small
- style
= font-weight: bold
- xml:id
= abc123
span (2)
- class
= foo
= bar
(Or I suppose an adhoc interim xml format that I could easily convert
to that would be better.)
Is this even easier in xslt2?
Many thanks for any suggestions,
-James
--
James Cummings, Cummings dot James at GMail dot com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








