|
RE: [Announce] Escaping double quotation marks in XSL: msg#00031java.helma.antville.user
Timothy, well, .... yes, .... but I think that trying to inject double quotes into the attribute value (with modifications to you suggestion) in this way will only get them escaped as " which is not what the user wanted. - Brian "Timothy Jones" <Timothy.Jones@sy niverse.com> To <keshlam@xxxxxxxxxx>, Brian 10/24/2007 12:14 Minchau/Toronto/IBM@IBMCA PM cc <general@xxxxxxxxxxxxxx>, <tranceradi@xxxxxxxxxxx>, <xalan-j-users@xxxxxxxxxxxxxx> Subject RE: [Announce] Escaping double quotation marks in XSL Maybe you should explore something like this: <xsl:element name='image'> <xsl:for-each select='@*'> <xsl:attribute name='qname(.)'><xsl:value-of select='.' /></xsl:attribute> </xsl:for-each> </xsl:element> This way, the transformer is at least aware of the tag you are trying to insert into the output. tlj From: keshlam@xxxxxxxxxx [mailto:keshlam@xxxxxxxxxx] Sent: Wednesday, October 24, 2007 11:58 AM To: Brian Minchau Cc: general@xxxxxxxxxxxxxx; tranceradi@xxxxxxxxxxx; xalan-j-users@xxxxxxxxxxxxxx Subject: Re: [Announce] Escaping double quotation marks in XSL > Assuming that you are only interested in stream serialization, have you > thought of doing the serialization yourself for particular elements? For > example, something like this: > > <!-- self serialization of image elements with tag for image done in > CDATA, but delegate attributes serialization --> > <xsl:template match="image"> > <![CDATA[ <image]>><xsl:apply-templates select="@*"/> <![CDATA[ >]>> > </xsl:template> I *REALLY* detest that idiom. I've seen many people hurt themselves by trying to hand-generate XML; I consider it a very bad practice. Unless you're forced to do it in order to work with a downstream tool which has not been implemented correctly, I would recommend finding another solution. Any other solution. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [Announce] Escaping double quotation marks in XSL, Brian Minchau |
|---|---|
| Next by Date: | Re: [Announce] Escaping double quotation marks in XSL, keshlam |
| Previous by Thread: | RE: [Announce] Escaping double quotation marks in XSL, Timothy Jones |
| Next by Thread: | RE: [Announce] Escaping double quotation marks in XSL, Timothy Jones |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |