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

RE: XML serializer implemented in XSLT

Subject: RE: XML serializer implemented in XSLT
From: "Evan Lenz" <elenz@xxxxxxxxxxx>
Date: Tue, 29 May 2001 14:42:06 -0700
exclude unused prefixes
> some things will be reinvented from time to time ;-)

Yes, I assumed someone had already done something like this. I'm glad I did
it though; I learned some things in the process.

> It seems you are considering some more circumstances than me
> ("]]>" for example) and your stylesheet can be parameterized in a
> fairly sophisticated way.

I wanted to make it as general-purpose as possible, hence all the
parameterization hooks. I wondered if it would be possible to allow the user
to specify something more specific re: namespaces, a la
exclude-result-prefixes. I don't think that would be possible though,
because prefixes would need to be resolved at invocation and there's no way
for me to introspect my template rule's current namespace nodes.
Alternatively, I could have asked for the entire URIs, but I think the
boolean exclude-unused-prefixes (in element and attribute names) is good
enough for now.

Ironically, you'd probably need even more parameterization to provide syntax
coloring. Actually, maybe all I'd need to do is change all my <xsl:value-of
select="$variable"/> instructions to xsl:copy-of instructions. The user
could then just enter an RTF as the value of the corresponding top-level
parameter if they wanted... At that point, xml-to-string.xsl wouldn't seem
like the best name.

To highlight prefixes, I'd need to break up name(), but that should be easy
too.

At some point, I'll take a closer look at your stylesheet, especially how
you handle namespace nodes.

> Maybe we can take the best of both worlds and submit it to the
> XSLT Standard Library [3]? (Unfortunately I haven't got the time
> yet to look closer at this project ...)

I took a brief look at it. The current submissions seem to have something
against template rules... Maybe that's just the nature of the submissions so
far. The biggest initial barrier to me was the extensive set of rigorous
documentation requirements, for which they seem to have created their own
DocBook extensions. I'll have to look more closely at it later as well.

Evan


 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.