Re: [xsl] Re: [XSL-List: The Open Forum on XSL] Digest for 2018-11-06

Subject: Re: [xsl] Re: [XSL-List: The Open Forum on XSL] Digest for 2018-11-06
From: "Geert Bormans geert@xxxxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 7 Nov 2018 18:46:54 -0000
As Kevin said....
you can't use Saxon 6.5 and have XSLT 2 functionality
Download the Saxon 9 HE from http://saxon.sourceforge.net/
(or purchase a PE/EE license from the saxonica website)
put that jar on the classpath
and change this reference
C:\Program Files\RenderX\XEP\lib\saxon6.5.5\saxon.jar
to a reference for the saxonhe.jar


Best regards,

Geert Bormans

--------------------------------------------------------------
Mark(up) the date!
Markup UK 2019 will happen June 8 and 9 in London


Van: "Abel Braaksma, (Exselt) abel@xxxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Aan: "Abel Braaksma, (Exselt) abel@xxxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>, "kevin brown"
<kevin.brown@xxxxxxxxxxxxxxxx>, "xsl-list" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Verzonden: Woensdag 7 november 2018 19:16:09
Onderwerp: [xsl] Re: [XSL-List: The Open Forum on XSL] Digest for 2018-11-06


Below is my x4u.bat and xep.bat file information, still i am getting same
error foe current date:


x4u.bat
-----------------
set CP=C:\Program Files\RenderX\XEP\lib\xep.jar;C:\Program
Files\RenderX\XEP\lib\saxon6.5.5\saxon.jar;C:\Program
Files\RenderX\XEP\lib\saxon6.5.5\saxon-xml-apis.jar;C:\Program
Files\RenderX\XEP\lib\saxon6.5.5\saxon9he.jar;C:\Program
Files\RenderX\XEP\lib\xt.jar;C:\Program
Files\RenderX\XEP\lib\x4u.jar;C:\Program Files\RenderX\XEP\lib\crimson.jar

"C:\Program Files\Java\jre1.8.0_161\bin\java"
"-Dcom.renderx.xep.CONFIG=C:\Program Files\RenderX\XEP\xep.xml" -classpath
"%CP%" com.renderx.xepx.x4u.as.Assistant

xep.bat
---------------------
@echo off
rem This batch file encapsulates a standard XEP call.

set CP=C:\Program Files\RenderX\XEP\lib\xep.jar;C:\Program
Files\RenderX\XEP\lib\saxon6.5.5\saxon.jar;C:\Program
Files\RenderX\XEP\lib\saxon6.5.5\saxon-xml-apis.jar;C:\Program
Files\RenderX\XEP\lib\xt.jar

if x%OS%==xWindows_NT goto WINNT
"C:\Program Files\Java\jre1.8.0_161\bin\java" -classpath "%CP%"
com.renderx.xep.XSLDriver "-DCONFIG=C:\Program Files\RenderX\XEP\xep.xml" %1
%2 %3 %4 %5 %6 %7 %8 %9
goto END

:WINNT
"C:\Program Files\Java\jre1.8.0_161\bin\java" -classpath "%CP%"
com.renderx.xep.XSLDriver "-DCONFIG=C:\Program Files\RenderX\XEP\xep.xml" %*

:END


set CP=


On Wed, Nov 7, 2018 at 4:24 PM XSL-List: The Open Forum on XSL < [
mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx |
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx ] > wrote:


This message contains the recent posts to the XSL-List: The Open Forum on XSL
mailing list managed by Mulberry Technologies, Inc. ( [
http://www.mulberrytech.com/ | http://www.mulberrytech.com/ ] ).




---------- Forwarded message ----------
From: Michael Kay < [ mailto:mike@xxxxxxxxxxxx | mike@xxxxxxxxxxxx ] >
To: xsl-list < [ mailto:xsl-list@xxxxxxxxxxxxxxxxxxxxxx |
xsl-list@xxxxxxxxxxxxxxxxxxxxxx ] >
Cc:
Bcc:
Date: Tue, 6 Nov 2018 10:55:58 +0000
Subject: Re: [xsl] Saxon command-line: How to assign a sequence of multiple
strings to a global param
Indeed, I often use this approach, especially in cases where the stylesheet is
designed to be called from the command line. But if you want to invoke a
stylesheet that wasn't designed with that in mind, it's still possible to set
any parameter using the ?name=expression notation.
Sometimes it's appropriate to provide multiple "top-level" overlay stylesheets
offering different APIs.

Michael Kay
Saxonica


BQ_BEGIN

On 6 Nov 2018, at 10:33, Mukul Gandhi [ mailto:gandhi.mukul@xxxxxxxxx |
gandhi.mukul@xxxxxxxxx ] < [ mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx |
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx ] > wrote:

On Mon, Nov 5, 2018 at 11:07 PM Jorge . [ mailto:chocolate.camera@xxxxxxxxx |
chocolate.camera@xxxxxxxxx ] < [
mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx |
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx ] > wrote:

BQ_BEGIN

Running Saxon from the command line (testing with Saxon-HE 9.2.1.2Jbyes, old
as heckbon Bash 3.2.57(1)), is there a way to set the value of a global
parameter of an XSLT2 stylesheet to a sequence of strings?

<xsl:param name="MY_ARRAY" as="xs:string*"/>

When attempting to do it like this:

java -jar saxon9he.jar [options] 'MY_ARRAY="one" "two" "three"'
java -jar saxon9he.jar [options] MY_ARRAY='"one" "two" "three"'

Saxon seemingly interprets spaces as literal, and the value of the parameter
becomes one single string

<xsl:message select="count($MY_ARRAY)"/>
b 1

instead of interpreting them as separators so that the value of the parameter
contains those three.



This could be done as follows, I think.

Pass a parameter to stylesheet as follows,
MY_ARRAY="one;two;three"

(there's only one string parameter. but we use a delimiter between words. in
this example ; is a delimiter)

In the stylesheet, we declare as follows
<xsl:param name="MY_ARRAY" as="xs:string"/>

Then we need to use fn:tokenize on MY_ARRAY.

You may choose a convenient delimiter for your environment.


--
Regards,
Mukul Gandhi
[ http://www.mulberrytech.com/xsl/xsl-list | XSL-List info and archive ]
[ http://lists.mulberrytech.com/unsub/xsl-list/293509 | EasyUnsubscribe ] ( [
https://mail.telenet.be/zimbra/mail?null=&client=advanced | by email ] )

BQ_END





---------- Forwarded message ----------
From: Rahul Singh < [ mailto:rahulsinghindia15@xxxxxxxxx |
rahulsinghindia15@xxxxxxxxx ] >
To: "XSL-List: The Open Forum on XSL" < [
mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx |
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx ] >, [
mailto:xsl-list@xxxxxxxxxxxxxxxxxxxxxx | xsl-list@xxxxxxxxxxxxxxxxxxxxxx ]
Cc:
Bcc:
Date: Tue, 6 Nov 2018 18:26:57 +0530
Subject: RenderX XEP current date error
Hi,

I have installed RenderX XEP and written XSL in 2.0 and trying to generate PDF
but getting error for current-date while same i have execute in Altova and
that is working fine:


C:\Program Files\RenderX\XEP>xep -xml Source.xml -xsl Source.xsl
(document [system-id Source.xml]
[error] Error in expression
substring-before(substring-after(string(current-date()),'-'),'-'): Unknown
system function: current-date; SystemID: Source.xsl; Line#: 78; Column#: -1
[error] javax.xml.transform.TransformerException: Error in expression
substring-before(substring-after(string(current-date()),'-'),'-'): Unknown
system function: current-date
error: formatting failed: javax.xml.transform.TransformerException: Error in
expression substring-before(substring-after(string(current-date()),'-'),'-'):
Unknown system function: current-date


Thanks,
Rahul



---------- Forwarded message ----------
From: "G. Ken Holman" < [ mailto:gkholman@xxxxxxxxxxxxxxxxxxxx |
gkholman@xxxxxxxxxxxxxxxxxxxx ] >
To: < [ mailto:xsl-list@xxxxxxxxxxxxxxxxxxxxxx |
xsl-list@xxxxxxxxxxxxxxxxxxxxxx ] >, "XSL-List: The Open Forum on XSL" < [
mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx |
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx ] >
Cc:
Bcc:
Date: Tue, 06 Nov 2018 08:37:29 -0500
Subject: Re: [xsl] RenderX XEP current date error
At 2018-11-06 12:58 +0000, Rahul Singh [ mailto:rahulsinghindia15@xxxxxxxxx |
rahulsinghindia15@xxxxxxxxx ] wrote:
>I have installed RenderX XEP and written XSL in
>2.0 and trying to generate PDF but getting error
>for current-date while same i have execute in Altova and that is working
fine:
>
>
>C:\Program Files\RenderX\XEP>xep -xml Source.xml -xsl Source.xsl
>(document [system-id Source.xml]
>C [error] Error in expression
>substring-before(substring-after(string(current-date()),'-'),'-'):
>Unknown system function: current-date; SystemID:
>Source.xsl; Line#: 78; Column#: -1
>C [error]
>javax.xml.transform.TransformerException: Error
>in expression
>substring-before(substring-after(string(current-date()),'-'),'-'):
>Unknown system function: current-date
>error: formatting failed:
>javax.xml.transform.TransformerException: Error
>in expression
>substring-before(substring-after(string(current-date()),'-'),'-'):
>Unknown system function: current-date

The error message says it all: the function you
need is not available in the XSLT processor you are using.

Consider the below XSL-FO stylesheet that can make the check you need.

I hope this helps.

. . . . . Ken

~/y/samp $ xslt checkFor2.xsl checkFor2.xsl /dev/null

This stylesheet requires at least version 2.0 of XSLT to run.

Processing terminated by xsl:message at line 8
~/y/samp $ xslt2 checkFor2.xsl checkFor2.xsl /dev/null
~/y/samp $ cat checkFor2.xsl
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl=" [ http://www.w3.org/1999/XSL/Transform |
http://www.w3.org/1999/XSL/Transform ] "
xmlns=" [ http://www.w3.org/1999/XSL/Format |
http://www.w3.org/1999/XSL/Format ] "
version="2.0">

<xsl:template match="/">
<xsl:if test="number(system-property('xsl:version')) &lt; 2.0">
<xsl:message terminate="yes">
This stylesheet requires at least version 2.0 of XSLT to run.
</xsl:message>
</xsl:if>
<root font-family="Times" font-size="20pt">

<layout-master-set>
<simple-page-master master-name="frame"
page-height="297mm" page-width="210mm"
margin-top="15mm" margin-bottom="15mm"
margin-left="15mm" margin-right="15mm">
<region-body region-name="frame-body"/>
</simple-page-master>
</layout-master-set>

<page-sequence master-reference="frame">
<flow flow-name="frame-body">
<block>
XSLT Processor:
<xsl:value-of select="system-property('xsl:vendor')"/>
<xsl:text> </xsl:text>
<xsl:value-of select="system-property('xsl:vendor-url')"/>
</block>
</flow>
</page-sequence>
</root>

</xsl:template>

</xsl:stylesheet>
~/y/samp $


--
Contact info, blog, articles, etc. [ http://www.cranesoftwrights.com/s/ |
http://www.CraneSoftwrights.com/s/ ] |
Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
Streaming hands-on XSLT/XPath 2 training class @ US$45 (5 hours free) |




---------- Forwarded message ----------
From: Kevin Brown < [ mailto:kevin.brown@xxxxxxxxxxxxxxxx |
kevin.brown@xxxxxxxxxxxxxxxx ] >
To: < [ mailto:xsl-list@xxxxxxxxxxxxxxxxxxxxxx |
xsl-list@xxxxxxxxxxxxxxxxxxxxxx ] >
Cc:
Bcc:
Date: Tue, 6 Nov 2018 10:12:23 -0800
Subject: RE: [xsl] RenderX XEP current date error


Look inside the file you are running which is xep.bat.

You will find the classpath which likely includes Saxon 6 which is not an XSL
2.0 processor.

You need to change this to use whatever XSLT 2.0 processor you are using.



Kevin Brown

RenderX



From: Rahul Singh [ mailto:rahulsinghindia15@xxxxxxxxx |
rahulsinghindia15@xxxxxxxxx ] [mailto: [
mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx |
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx ] ]
Sent: Tuesday, November 06, 2018 4:58 AM
To: XSL-List: The Open Forum on XSL < [
mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx |
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx ] >; [
mailto:xsl-list@xxxxxxxxxxxxxxxxxxxxxx | xsl-list@xxxxxxxxxxxxxxxxxxxxxx ]
Subject: [xsl] RenderX XEP current date error




Hi,





I have installed RenderX XEP and written XSL in 2.0 and trying to generate PDF
but getting error for current-date while same i have execute in Altova and
that is working fine:








C:\Program Files\RenderX\XEP>xep -xml Source.xml -xsl Source.xsl


(document [system-id Source.xml]


[error] Error in expression
substring-before(substring-after(string(current-date()),'-'),'-'): Unknown
system function: current-date; SystemID: Source.xsl; Line#: 78; Column#: -1


[error] javax.xml.transform.TransformerException: Error in expression
substring-before(substring-after(string(current-date()),'-'),'-'): Unknown
system function: current-date


error: formatting failed: javax.xml.transform.TransformerException: Error in
expression substring-before(substring-after(string(current-date()),'-'),'-'):
Unknown system function: current-date








Thanks,


Rahul


[ http://www.mulberrytech.com/xsl/xsl-list | XSL-List info and archive ]

[ http://lists.mulberrytech.com/unsub/xsl-list/3183067 | EasyUnsubscribe ] ( [
https://mail.telenet.be/zimbra/mail?null=&client=advanced | by email ] )

BQ_END

[ http://www.mulberrytech.com/xsl/xsl-list |
XSL-List info and archive ]
[ http://lists.mulberrytech.com/unsub/xsl-list/554170 | EasyUnsubscribe ] ( [
| by email ] )

Current Thread