A
Angus Parvis
Hi,
I use the java.xml.transform libs to read an XSL stylesheet and
transform and existing XML file to HTML. At least I try to, but there's
a problem:
I use variables in the XSL and using them with <xsl:value-of
select="$variable.name"> works fine. The variables are used for I18N, so
there are some places, where I want to use the variables inside of
HTML-Tags, for example within the submit-tag of a form.
I'm new to XSLT, XPath and this stuff, and it didn't work with simple a
"xsl:value-of". Someone told me to do use the following XPath expression:
<input value="{concat($text, '.submit')}" ... />
and i guess this should work either:
<input value="{string($text.submit)}" ... />
But when transforming, i get a this exception:
javax.xml.transform.TransformerException: Premature end of file.
Without the XPath-Expression the XSL works fine, so this should be the
source of the problem.
Do you have any suggestions how to solve this problem? Maybe any other
attempts to achieve the same goal?
Thanks in advance for your help.
Angus
I use the java.xml.transform libs to read an XSL stylesheet and
transform and existing XML file to HTML. At least I try to, but there's
a problem:
I use variables in the XSL and using them with <xsl:value-of
select="$variable.name"> works fine. The variables are used for I18N, so
there are some places, where I want to use the variables inside of
HTML-Tags, for example within the submit-tag of a form.
I'm new to XSLT, XPath and this stuff, and it didn't work with simple a
"xsl:value-of". Someone told me to do use the following XPath expression:
<input value="{concat($text, '.submit')}" ... />
and i guess this should work either:
<input value="{string($text.submit)}" ... />
But when transforming, i get a this exception:
javax.xml.transform.TransformerException: Premature end of file.
Without the XPath-Expression the XSL works fine, so this should be the
source of the problem.
Do you have any suggestions how to solve this problem? Maybe any other
attempts to achieve the same goal?
Thanks in advance for your help.
Angus