Re: Saxon processor for XSLT 3.0

Michael Kay <mike-JkSD5nQpfvpWk0Htik3J/[email protected]> Thu, 30 Sep 2021 17:38:09 +0100
Newsgroups gmane.text.xml.saxon.help
Message-ID <[email protected]>
--===============6876000173267011807==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_581BB83D-40E6-4913-84E7-CAB66E3A305D"


--Apple-Mail=_581BB83D-40E6-4913-84E7-CAB66E3A305D
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

I'm sorry, I replied to this earlier but my reply only made it as far as =
my drafts folder.

As Eduard points out (with a misspelling), to use text value templates =
in XSLT 3.0 you need to set expand-text=3D"yes" at some level - I =
usually put it on the xsl:stylesheet element itself. The reason for this =
is backwards compatibility.

Michael Kay
Saxonica

> On 23 Sep 2021, at 06:13, VISHNU SINGH <[email protected]> =
wrote:
>=20
>=20
> Greetings for the day!
> Please suggest for the below query!
>=20
> ---------- Forwarded message ---------
> From: VISHNU SINGH <[email protected] =
<mailto:[email protected]>>
> Date: Thu, 23 Sept 2021 at 10:40
> Subject: Saxon processor for XSLT 3.0
> To: xsl-list-lists.mulberrytech.co =
<http://xsl-list-lists.mulberrytech.co/> =
<[email protected] =
<mailto:[email protected]>>
>=20
>=20
> Hi,
>=20
> I want to use the Saxon processor for XSLT 3.0. For this I have =
downloaded the SaxonHE10-6J  package.
>=20
> I am simply trying to print a message using below xslt 3.0
>=20
> <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> <xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform =
<http://www.w3.org/1999/XSL/Transform>" version=3D"3.0">
>     <xsl:variable name=3D"version" select=3D"3.0"/>
>     <xsl:template match=3D"/">
>         <xsl:message>this is test xslt version =
{$version}</xsl:message>
>     </xsl:template>
> </xsl:stylesheet>
>=20
> And running it from the command line
> java -jar saxon-he-10.6.jar -s:test.xml -xsl:test.xsl -o:output.xml
>=20
> and as an output it is just printing the=20
> "this is test xslt version {$version}"
>=20
> It is not evaluating the variable 'version'.
>=20
> Could someone please suggest what i am doing wrong?
> OR
> there is different saxon jar that I should use for xslt 3.0
>=20
> Please suggest.
>=20
> Kind regards,
> Vishnu
> --=20
> Vishnu Singh | http://marklogicgd.blogspot.com/ =
<http://marklogicgd.blogspot.in/>
>=20
>=20
>=20
> --=20
> Vishnu Singh | http://marklogicgd.blogspot.com/ =
<http://marklogicgd.blogspot.in/>
>=20
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/saxon-help


--Apple-Mail=_581BB83D-40E6-4913-84E7-CAB66E3A305D
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">I'm =
sorry, I replied to this earlier but my reply only made it as far as my =
drafts folder.<div class=3D""><br class=3D""></div><div class=3D"">As =
Eduard points out (with a misspelling), to use text value templates in =
XSLT 3.0 you need to set expand-text=3D"yes" at some level - I usually =
put it on the xsl:stylesheet element itself. The reason for this is =
backwards compatibility.</div><div class=3D""><br class=3D""></div><div =
class=3D"">Michael Kay</div><div class=3D"">Saxonica<br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On 23 Sep 2021, at 06:13, VISHNU SINGH &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" =
class=3D""><br class=3D"">Greetings for the&nbsp;day!<div =
class=3D"">Please suggest for the below query!</div><div class=3D""><br =
class=3D""><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">---------- Forwarded message ---------<br =
class=3D"">From: <strong class=3D"gmail_sendername" dir=3D"auto">VISHNU =
SINGH</strong> <span dir=3D"auto" class=3D"">&lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt;</span><br class=3D"">Date: =
Thu, 23 Sept 2021 at 10:40<br class=3D"">Subject: Saxon processor for =
XSLT 3.0<br class=3D"">To: <a =
href=3D"http://xsl-list-lists.mulberrytech.co/" =
class=3D"">xsl-list-lists.mulberrytech.co</a> &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt;<br class=3D""></div><br=
 class=3D""><br class=3D""><div dir=3D"ltr" class=3D"">Hi,<div =
class=3D""><br class=3D""></div><div class=3D"">I want to use the Saxon =
processor for XSLT 3.0. For this I have&nbsp;downloaded the&nbsp;<b =
class=3D"">SaxonHE10-6J&nbsp; </b>package.</div><div class=3D""><br =
class=3D""></div><div class=3D"">I am simply trying to print a message =
using below xslt 3.0</div><div class=3D""><br class=3D""></div><div =
class=3D""><div style=3D"margin: 0px; font-variant-numeric: normal; =
font-variant-east-asian: normal; font-stretch: normal; font-size: 12px; =
line-height: normal; font-family: Helvetica; color: rgb(0, 90, 180);" =
class=3D""><span style=3D"color:rgb(139,38,201)" class=3D"">&lt;?xml =
version=3D"1.0" encoding=3D"UTF-8"?&gt;</span><span style=3D"" =
class=3D""><br class=3D"">
</span>&lt;xsl:stylesheet<span style=3D"color:rgb(245,132,76)" class=3D"">=
 </span><span style=3D"color:rgb(0,153,204)" =
class=3D"">xmlns:xsl</span><span style=3D"color:rgb(255,128,64)" =
class=3D"">=3D</span><span style=3D"color:rgb(153,51,0)" class=3D"">"<a =
href=3D"http://www.w3.org/1999/XSL/Transform" target=3D"_blank" =
class=3D"">http://www.w3.org/1999/XSL/Transform</a>"</span><span =
style=3D"color:rgb(245,132,76)" class=3D""> version</span><span =
style=3D"color:rgb(255,128,64)" class=3D"">=3D</span><span =
style=3D"color:rgb(153,51,0)" class=3D"">"3.0"</span><span =
style=3D"color:rgb(0,0,150)" class=3D"">&gt;</span><span style=3D"" =
class=3D""><br class=3D"">
<span class=3D"">&nbsp; &nbsp; </span></span>&lt;xsl:variable<span =
style=3D"color:rgb(245,132,76)" class=3D""> name</span><span =
style=3D"color:rgb(255,128,64)" class=3D"">=3D</span><span =
style=3D"color:rgb(153,51,0)" class=3D"">"version"</span><span =
style=3D"color:rgb(245,132,76)" class=3D""> select</span><span =
style=3D"color:rgb(255,128,64)" class=3D"">=3D</span><span =
style=3D"color:rgb(153,51,0)" class=3D"">"</span><span =
style=3D"color:rgb(50,50,150)" class=3D"">3.0</span><span =
style=3D"color:rgb(153,51,0)" class=3D"">"</span><span =
style=3D"color:rgb(0,0,150)" class=3D"">/&gt;</span><span style=3D"" =
class=3D""><br class=3D"">
<span class=3D"">&nbsp; &nbsp; </span></span>&lt;xsl:template<span =
style=3D"color:rgb(245,132,76)" class=3D""> match</span><span =
style=3D"color:rgb(255,128,64)" class=3D"">=3D</span><span =
style=3D"color:rgb(153,51,0)" class=3D"">"</span><span =
style=3D"color:rgb(120,120,0)" class=3D"">/</span><span =
style=3D"color:rgb(153,51,0)" class=3D"">"</span><span =
style=3D"color:rgb(0,0,150)" class=3D"">&gt;</span><span style=3D"" =
class=3D""><br class=3D"">
<span class=3D"">&nbsp; &nbsp; &nbsp; &nbsp; =
</span></span>&lt;xsl:message&gt;<span style=3D"" class=3D"">this is =
test xslt version {$version}</span>&lt;/xsl:message&gt;<span style=3D"" =
class=3D""><br class=3D"">
<span class=3D"">&nbsp; &nbsp; </span></span>&lt;/xsl:template&gt;<span =
style=3D"" class=3D""><br class=3D"">
</span>&lt;/xsl:stylesheet&gt;</div><div style=3D"margin: 0px; =
font-variant-numeric: normal; font-variant-east-asian: normal; =
font-stretch: normal; font-size: 12px; line-height: normal; font-family: =
Helvetica; color: rgb(0, 90, 180);" class=3D""><br class=3D""></div><div =
class=3D"">And running it from the command line</div><div class=3D"">java =
-jar saxon-he-10.6.jar -s:test.xml -xsl:test.xsl -o:output.xml<br =
class=3D""></div><div class=3D""><br class=3D""></div><div class=3D"">and =
as an output it is just printing&nbsp;the&nbsp;</div><div class=3D"">"this=
 is test xslt version {$version}"</div><div class=3D""><br =
class=3D""></div><div class=3D"">It is not evaluating&nbsp;the variable =
'version'.</div><div class=3D""><br class=3D""></div><div class=3D"">Could=
 someone please suggest what i am doing&nbsp;wrong?</div>OR</div><div =
class=3D"">there is different saxon jar that I should use for xslt =
3.0</div><div class=3D""><br class=3D""></div><div class=3D"">Please =
suggest.</div><div class=3D""><br class=3D""></div><div =
class=3D"">Kind&nbsp;regards,</div><div class=3D"">Vishnu</div><div =
class=3D"">-- <br class=3D""><div dir=3D"ltr" =
data-smartmail=3D"gmail_signature" class=3D""><div dir=3D"ltr" =
class=3D""><div class=3D"">Vishnu Singh |&nbsp;<a =
href=3D"http://marklogicgd.blogspot.in/" target=3D"_blank" =
class=3D"">http://marklogicgd.blogspot.com/</a></div><div class=3D""><br =
class=3D""></div></div></div></div></div>
</div><br clear=3D"all" class=3D""><div class=3D""><br class=3D""></div>--=
 <br class=3D""><div dir=3D"ltr" class=3D"gmail_signature" =
data-smartmail=3D"gmail_signature"><div dir=3D"ltr" class=3D""><div =
class=3D"">Vishnu Singh |&nbsp;<a href=3D"http://marklogicgd.blogspot.in/"=
 target=3D"_blank" =
class=3D"">http://marklogicgd.blogspot.com/</a></div><div class=3D""><br =
class=3D""></div></div></div></div></div>
_______________________________________________<br class=3D"">saxon-help =
mailing list archived at <a href=3D"http://saxon.markmail.org/" =
class=3D"">http://saxon.markmail.org/</a><br class=3D""><a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a><br =
class=3D"">https://lists.sourceforge.net/lists/listinfo/saxon-help =
</div></blockquote></div><br class=3D""></div></body></html>=

--Apple-Mail=_581BB83D-40E6-4913-84E7-CAB66E3A305D--


--===============6876000173267011807==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============6876000173267011807==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
--===============6876000173267011807==--