Subject: RE: [xsl] XML serializer implemented in XSLT From: "Evan Lenz" <elenz@xxxxxxxxxxx> Date: Tue, 29 May 2001 14:42:06 -0700 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XML serializer implemente, Oliver Becker | Thread | RE: [xsl] XML serializer implemente, Evan Lenz |
RE: [xsl] XML serializer implemente, Evan Lenz | Date | RE: [xsl] XML serializer implemente, Evan Lenz |
Month |