You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Nielsen, Anders Rolann" <an...@wmdata.com> on 2000/06/15 09:01:48 UTC
Using quot!
Hello!
I have a problem I don't know how to solve.
If I have an xml-input file like:
<A>This is a "test"</A>
and I want to transform this into the HTML-tag INPUT where the content of
<A> must go into the attribut named value, I loose the "test". I have tried
to use " but still it converts tis into " before the HTML document is
created.
Is this a bug or is there a solution to the problem.
Regards
Anders Rolann
Re: Using quot!
Posted by Brian Hüttner <ti...@Informatik.Uni-Bremen.DE>.
Hello,
don't know if this is what you want. But try this files:
-----------------XML--------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<A>This is a "test"</A>
-----------------/XML-------------------
-----------------XSL--------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" />
<xsl:template match="A">
<INPUT>
<xsl:attribute name="value">
<xsl:value-of select="text()"/>
</xsl:attribute>
</INPUT>
</xsl:template>
</xsl:stylesheet>
-----------------/XSL--------------------
I think you forget to set the appropriate output
method to html.
bsw the output looks like this:
<INPUT value="This is a "test"">
Best regards
Brian
"Nielsen, Anders Rolann" schrieb:
>
> Hello!
>
> I have a problem I don't know how to solve.
> If I have an xml-input file like:
> <A>This is a "test"</A>
> and I want to transform this into the HTML-tag INPUT where the content of
> <A> must go into the attribut named value, I loose the "test". I have tried
> to use " but still it converts tis into " before the HTML document is
> created.
>
> Is this a bug or is there a solution to the problem.
>
> Regards
> Anders Rolann
--
+--------------------------------------------------------+
| Brian Hüttner University of Bremen |
| tim@informatik.uni-bremen.de FB3 - Computer Science |
+--------------------------------------------------------+