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

Re: Announce: Updated free SHOWTREE stylesheet resource

Subject: Re: Announce: Updated free SHOWTREE stylesheet resource
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 16 May 2000 18:23:27 -0600 (MDT)
dog myns
> Now that there are XSLT processors that give access to the namespace axis, 
> it is past time for an update to this diagnostic resource.
> 
> SHOWTREE is a stylesheet that reveals an XSLT processor's node tree 
> interpretation of a source document.
> 
> As delivered, the stylesheet does not report any namespace information ... 
> to do so the file contains the instructions of which lines to remove.  When 
> used with these lines removed, namespace nodes are exposed.

FWIW, it should be noted that I haven't tested my SHOWTREE-inspired
Fancy XML Tree Viewer with anything but XT, so I'm sure it has the
same problems.
 
> Another change: the enumeration of child nodes no longer includes the 
> attached attribute nodes in the same count.  This was done in earlier 
> versions to reveal the order of "*|@*" but ended up being confusing to some 
> who thought the attribute nodes were considered child nodes.

I did the same kind of thing. Visually, I made attribute nodes look like
children. I've considered rewriting the stylesheet to address this, but
due to poor web browser implementations of nested tables, I'd rather try
something plain text-based, like SHOWTREE.

I'd really like to create the kind of ASCII art I've posted to the list.
For example,

<?xml version="1.0"?>
<foo xmlns="http://yournamespace" xmlns:myns="http://mynamespace">
<myns:bar baz="maz">my dog has fleas</myns:bar>
<myns:bar/>
</foo>

would become:

root
  |__element 'foo' from ns 'http://yournamespace'
       |  \__expanded-name 'foo'
       |  \__namespace 'myns'='http://mynamespace'
       |  \__namespace 'xml'='http://www.w3.org/XML/1998/namespace'
       |
       |__text '\n'
       |
       |__element 'bar' from ns 'http://mynamespace'
       |    |  \__expanded-name 'myns:bar'
       |    |  \__namespace 'myns'='http://mynamespace'
       |    |  \__namespace 'xml'='http://www.w3.org/XML/1998/namespace'
       |    |  \__attribute 'baz'='maz'
       |    |
       |    |__text 'my dog has fleas'
       |
       |__text '\n'
       |
       |__element 'bar'
       |       \__expanded-name 'myns:bar'
       |       \__namespace 'myns'='http://mynamespace'
       |       \__namespace 'xml'='http://www.w3.org/XML/1998/namespace'
       |
       |__text '\n'

I suspect, however, that the logic necessary to do this is beyond the
scope of an XSL transformation. Feel free to prove me wrong, though!

   - Mike
___________________________________________________________
Mike J. Brown, software engineer, Webb Interactive Services
XML/XSL stuff: http://www.skew.org/    http://www.webb.net/


 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.