[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Saxon unix script command line not finding stylesheet even though it exists


Subject: Re: [xsl] 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

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
Keywords
xml