This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: complexe variable
- From: "Ivan Pedruzzi" <ivan at exln dot com>
- To: <xsl-list at lists dot mulberrytech dot com>, "'ilyasov jian'" <jienbay at hotmail dot com>
- Date: Fri, 21 Jun 2002 02:52:36 -0400
- Subject: RE: [xsl] complexe variable
- Reply-to: xsl-list at lists dot mulberrytech dot com
You need to transform the variable content from result tree fragment to
nodeset
<?xml version='1.0' encoding='UTF-8' ?>
<xsl:stylesheet version='1.0'
xmlns:xalan='http://xml.apache.org/xalan'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="html"/>
<xsl:variable name="jian">
<suz>suz</suz>
<iwa>iwa</iwa>
</xsl:variable>
<xsl:template match="/">
<xsl:value-of select="xalan:nodeset($jian)/suz"/>
</xsl:template>
</xsl:stylesheet>
Ivan
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of
> ilyasov jian
> Sent: Friday, June 21, 2002 2:17 AM
> To: xsl-list@lists.mulberrytech.com; jienbay@hotmail.com
> Subject: [xsl] complexe variable
>
>
> hello all,
>
> i have the following stylsheet.
>
> <?xml version='1.0' encoding='UTF-8' ?>
> <xsl:stylesheet version='1.0'
> xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
>
> <xsl:output method="html"/>
>
> <xsl:variable name="jian">
> <suz>suz</suz>
> <iwa>iwa</iwa>
> </xsl:variable>
>
> <xsl:template match="/">
> <xsl:value-of select="$jian/suz"/>
> </xsl:template>
>
> </xsl:stylesheet>
>
> i was told that it should give
> 'suz' string, the value of <suz> element inside $jian
> variable. with Xalan i get error like:
>
> XSLException Type is: XObjectInvalidConversionException
> Message is: Cannot convert a #RESULT_TREE_FRAG to a node set.
> (Unknown URI,
> unkn
> own line, unknown column)
>
> version is :
> TestXSLT version 1.2.0 (Xalan C++ version 1.2.0)
>
> or when i just put
> <xsl:value-of select="$jian">
> it, as expected, gives me concatination of 2 child
> elements('suziwa') of
> the $jian variable.
>
> i found nothing in spec.
>
> please explane
>
> jian
>
> _________________________________________________________________
> 友達とのチャットツール MSN メッセンジャーのダウンロードはこちら
> http://messenger.msn.co.jp/
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list