[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: error when trying to run stylesheets with saxon:t

Subject: RE: error when trying to run stylesheets with saxon:transform() extension
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 26 Mar 2010 21:47:28 -0000
RE:  error when trying to run stylesheets with  saxon:t
Firstly, this is very Saxon-specific, so it would be better asked on the
saxon-help list (reachable via the Saxon project on SourceForge).

Secondly, the comments in the stylesheet say it was tested with Saxon
9.1.0.3. Which version are you running with?

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay  

> -----Original Message-----
> From: Lynn Murdock [mailto:lmurdock@xxxxxxxx] 
> Sent: 26 March 2010 21:09
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  error when trying to run stylesheets with 
> saxon:transform() extension
> 
> i'm hoping that someone can help me.  i'm currently testing 
> various stylesheets in the NLM's (national library of 
> medicine's) journal publishing 3.0 suite in an integrated 
> development environment (IDEA's intelliJ, using a saxon xslt 
> 2.0 processor).  some of these stylesheets are shell 
> stylesheets that pipeline other stylesheets.
> 
> i'm trying to test some of these integrated stylesheets, and 
> keep getting the following error in intelliJ that terminates 
> the transform:
> Error at saxon:assign on line 66 of 
> file:/home/lmurdock/development/ambra/webapp/target/classes/ma
> in/shell-utility.xsl:
>   XPST0003: XPath syntax error at char 135 on line 66 in {... 
> $runtime-params/* )}:
>     Cannot find a matching 3-argument function named 
> {http://saxon.sf.net/}transform()
> 
> the full stylesheets are far too long to include here, so i'm 
> including only what i think is the relevant code here.
> 
> first, the primary pipelining stylesheet (i'm not including 
> the citations-prep or jpub3 stylesheets because i don't think 
> they're relevant to this problem):
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- ============================================================= -->
> <!--  MODULE:    Saxon shell (pipelining) stylesheet               -->
> <!--             HTML Preview with APA-like citations              -->
> <!--  VERSION:   1.0                                               -->
> <!--  DATE:      January 2009                                      -->
> <!--                                                               -->
> <!-- ============================================================= -->
> 
> <!-- ============================================================= -->
> <!--  SYSTEM:    NCBI Archiving and Interchange Journal Articles   -->
> <!--                                                               -->
> <!--  PURPOSE:   Pipelines stylesheets to convert                  -->
> <!--             Journal Publishing 3.0 XML as follows:            -->
> <!--             1. format citations in APA-like style             -->
> <!--             2. convert to HTML for preview display            -->
> <!--                                                               -->
> <!--  PROCESSOR DEPENDENCIES:                                      -->
> <!--             Saxon, from Saxonica (www.saxonica.com)           -->
> <!--             Tested using Saxon 9.1.0.3 (B and SA)             -->
> <!--                                                               -->
> <!--  COMPONENTS REQUIRED:                                         -->
> <!--             main/shell-utility.xsl, plus all the stylesheets  -->
> <!--             named in the $processes variable declaration      -->
> <!--                                                               -->
> <!--  INPUT:     Journal Publishing 3.0 XML with citations         -->
> <!--             in APA format                                     -->
> <!--                                                               -->
> <!--  OUTPUT:    HTML                                              -->
> <!--                                                               -->
> <!--  CREATED FOR:                                                 -->
> <!--             Digital Archive of Journal Articles               -->
> <!--             National Center for Biotechnology Information     -->
> <!--                (NCBI)                                         -->
> <!--             National Library of Medicine (NLM)                -->
> <!--                                                               -->
> <!--  CREATED BY:                                                  -->
> <!--             Wendell Piez, Mulberry Technologies, Inc.         -->
> <!--                                                               -->
> <!-- ============================================================= -->
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   xmlns:saxon="http://saxon.sf.net/"
>   version="2.0"
>   extension-element-prefixes="saxon">
> 
>   <xsl:output method="html" omit-xml-declaration="yes"
>     encoding="utf-8" indent="no"/>
> 
>   <!-- <xsl:output method="xml" omit-xml-declaration="no"
>     encoding="utf-8" indent="no"/> -->
>   
>   <xsl:variable name="processes">
>     <!-- format citations in APA format -->
>     <step>citations-prep/jpub3-APAcit.xsl</step>
>     <!-- convert into HTML for display -->
>     <step>main/jpub3-html.xsl</step>
>   </xsl:variable>
> 
>   <xsl:include href="main/shell-utility.xsl"/>
> 
> </xsl:stylesheet>
> 
> 
> and then the included shell stylesheet:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- ============================================================= -->
> <!--  MODULE:    Saxon shell (pipelining) utility stylesheet       -->
> <!--  VERSION:   1.0                                               -->
> <!--  DATE:      January 2009                                      -->
> <!--                                                               -->
> <!-- ============================================================= -->
> 
> <!-- ============================================================= -->
> <!--  SYSTEM:    NCBI Archiving and Interchange Journal Articles   -->
> <!--                                                               -->
> <!--  PURPOSE:   Provide support for pipelining stylesheets        -->
> <!--             directly, using Saxon extensions, in XSLT 2.0     -->
> <!--                                                               -->
> <!--  PROCESSOR DEPENDENCIES:                                      -->
> <!--             Saxon, from Saxonica (www.saxonica.com)           -->
> <!--             Tested using Saxon 9.1.0.3 (B and SA)             -->
> <!--                                                               -->
> <!--  COMPONENTS REQUIRED:                                         -->
> <!--             This stylesheet does not stand alone; it is a     -->
> <!--             code module for inclusion into another stylesheet -->
> <!--             that specifies the steps of the pipeline.         -->
> <!--                                                               -->
> <!--  INPUT:     Any                                               -->
> <!--                                                               -->
> <!--  OUTPUT:    Any                                               -->
> <!--                                                               -->
> <!--  CREATED FOR:                                                 -->
> <!--             Digital Archive of Journal Articles               -->
> <!--             National Center for Biotechnology Information     -->
> <!--                (NCBI)                                         -->
> <!--             National Library of Medicine (NLM)                -->
> <!--                                                               -->
> <!--  CREATED BY:                                                  -->
> <!--             Wendell Piez, Mulberry Technologies, Inc.         -->
> <!--                                                               -->
> <!-- ============================================================= -->
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   xmlns:saxon="http://saxon.sf.net/"
>   version="2.0"
>   extension-element-prefixes="saxon">
> 
>   <!-- This stylesheet does not stand alone! It is a component
>        to be called into XSLT 2.0 shell stylesheets. -->
>   
>   <xsl:variable name="document" select="/" saxon:assignable="yes"/>
>   
>   <xsl:param name="runtime-params">
>     <base-dir>
>       <xsl:value-of
>         select="replace(base-uri(/), '/[^/]+$','')"/>     
>     </base-dir>
>   </xsl:param>
> 
>   <xsl:template match="/">
>     <xsl:for-each select="$processes/step/concat('../',.)">
>       <xsl:message>
>         <xsl:text>&#xA;... Applying </xsl:text>
>         <xsl:value-of select="."/>
>       </xsl:message>
>       <saxon:assign name="document"
>         select="saxon:transform(
>                   saxon:compile-stylesheet(doc(.)),
>                   $document,
>                   $runtime-params/* )"/>
>       <!-- A third argument to saxon:transform could specify
>            runtime parameters for any (or all) steps -->
>     </xsl:for-each>
>     <xsl:sequence select="$document"/>
>     <xsl:message>&#xA;... Done</xsl:message>
>   </xsl:template>
>   
> </xsl:stylesheet>
> 
> 
> i confirmed that the saxon:transform() extension function 
> does indeed exist:
> http://www.saxonica.com/documentation/extensions/functions/tra
> nsform.html
> and it looks to me like it's written properly.
> 
> does anyone have ideas about where the problem exists and how 
> i can go about remedying it?
> 
> 
> thanks-
> 
> lynn
> --------------------------------------------------------------
> --------------------------------------------------------------
> --------------------------------------------------------------
> --------------------------------
> This email is confidential to the intended recipient. If you 
> have received it in error, please notify the sender and 
> delete it from your system. Any unauthorized use, disclosure 
> or copying is not permitted. The views or opinions presented 
> are solely those of the sender and do not necessarily 
> represent those of Public Library of Science unless otherwise 
> specifically stated. Please note that neither Public Library 
> of Science nor any of its agents accept any responsibility 
> for any viruses that may be contained in this e-mail or its 
> attachments and it is your responsibility to scan the e-mail 
> and attachments (if any).

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.