Subject: [xsl] Returning a document fragment from Xalan extension function From: "Michal Urban" <michalurban@xxxxxxxxxxx> Date: Tue, 10 Jun 2003 15:07:54 -0400 |
Hello all, this is my first posting regarding my very first Xalan extension function in Java, I'll appreciate your thoughts: I'm processing the text() nodes and possibly adding markup to plain text (via external calls to "sed" - I have a set of rather tricky rules to perform ;-). When I return the result as a String, any inline "<elem>" gets translated into "<elem>" in the output. I can understand this since that's how a String should probably behave... When I create a DOM Document out of the text result and return it as a Node or DocumentFragment, any added markup is lost and only concatenated text() content from the result tree gets into the Xalan output. What is the proper way of passing the entire "enriched" structure into the output? I can actually get by using the "String" method with an additional "sed" pass of the output file replacing "<" etc. with proper markup, but that's certainly a crude way of doing it... Can anybody think about a better way of doing this (instead of Xalan-XSLT/Java/sed "contraption"). I looked into XSLT 2.0 (Saxon 7) and EXSLT but I don't think plain regexp match/replace will cut it here - sed scripts are more powerful/convenient (especially the external and XSL independent config - based on XSLT params or data). Thank you, Michal Urban XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] RE: with close, Lars Huttar | Thread | RE: [xsl] Returning a document frag, Robert Koberg |
Re: [xsl] Import HREF, Mike Brown | Date | Re: [xsl] read/write in the same xm, Wendell Piez |
Month |