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

Re: Saxon unix script command line not finding stylesh

Subject: Re: Saxon unix script command line not finding stylesheet even though it exists
From: "Bridger Dyson-Smith bdysonsmith@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 Nov 2014 16:12:38 -0000
Re:  Saxon unix script command line not finding stylesh
Hi Catherine,

I'm not sure why this is causing a problem. I've tried a number of
approaches and a vaguely similar script is working for me.

==========================
-> ls -l
-rwxr-xr-x  1 bridger  bridger  360 Nov 14 09:27 input.sh*
-rwxrwxrwx  1 bridger  bridger  120 Nov 14 08:46 input.xml*
-rwxrwxrwx  1 bridger  bridger  311 Nov 14 08:46 input.xsl*

-> cat input.sh
#!/bin/sh

INPUT_XML="/usr/home/bridger/Documents/xslt/listserv/cw-shell-script/input.xml"
INPUT_XSL="/usr/home/bridger/Documents/xslt/listserv/cw-shell-script/input.xsl"
SAXON_DIR="/usr/home/bridger/Documents/gsearch/FedoraGenericSearch/lib/"

echo $INPUT_XML
echo $INPUT_XSL
echo $SAXON_DIR

java -jar $SAXON_DIR/saxon9he.jar -xsl:$INPUT_XSL -s:$INPUT_XML

-> cat input.xml
<?xml version="1.0" encoding="UTF-8"?>
<doc>
  <a>Element</a>
  <b>Element, too</b>
  <c type="listServ">XSLT</c>
</doc>

 -> cat input.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  exclude-result-prefixes="#all">

  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>

When I run input.sh:
> ./input.sh
/usr/home/bridger/Documents/xslt/listserv/cw-shell-script/input.xml
/usr/home/bridger/Documents/xslt/listserv/cw-shell-script/input.xsl
/usr/home/bridger/Documents/gsearch/FedoraGenericSearch/lib/
<?xml version="1.0" encoding="UTF-8"?><doc>
  <a>Element</a>
  <b>Element, too</b>
  <c type="listServ">XSLT</c>
</doc>
==========================

I would check to make sure that LibrXML2CSV_stylesheet.xsl is in the right
place, or that all file paths are correct.

HTH,
Bridger



On Fri, Nov 14, 2014 at 8:20 AM, Liam R E Quin liam@xxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> On Fri, 14 Nov 2014 09:56:54 -0000
> "Kerry, Richard richard.kerry@xxxxxxxx" <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> > Saxon 6 used space.
> >
> > Saxon 9 uses colon.
>
> That explains my confusion, thanks!
>
>
> --
> Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
> Pictures from old books: http://fromoldbooks.org/

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.