xsl-list
[Top] [All Lists]

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

2018-11-07 12:16:09
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 <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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/).




---------- Forwarded message ----------
From: Michael Kay <mike(_at_)saxonica(_dot_)com>
To: xsl-list <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
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

On 6 Nov 2018, at 10:33, Mukul Gandhi gandhi(_dot_)mukul(_at_)gmail(_dot_)com 
<
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

On Mon, Nov 5, 2018 at 11:07 PM Jorge . 
chocolate(_dot_)camera(_at_)gmail(_dot_)com <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

Running Saxon from the command line (testing with Saxon-HE 9.2.1.2J—yes,
old as heck—on 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)"/>
→ 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
XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/293509> (by
email <>)





---------- Forwarded message ----------
From: Rahul Singh <rahulsinghindia15(_at_)gmail(_dot_)com>
To: "XSL-List: The Open Forum on XSL" <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>, 
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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" <gkholman(_at_)cranesoftwrights(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>, "XSL-List: The Open 
Forum on XSL" <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>
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 rahulsinghindia15(_at_)gmail(_dot_)com 
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]
  [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

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";
                 xmlns="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/ |
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 <kevin(_dot_)brown(_at_)xportability(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
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 rahulsinghindia15(_at_)gmail(_dot_)com [mailto:
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com]
*Sent:* Tuesday, November 06, 2018 4:58 AM
*To:* XSL-List: The Open Forum on XSL <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>; 
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
*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

XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>

EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3183067> (by
email <>)

--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>