Re: [xsl] passing a sequence as a parameter

Subject: Re: [xsl] passing a sequence as a parameter
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 26 Feb 2008 16:57:27 GMT
> It seems, +param=filename will be Saxon specific. 

any command line syntax is system specific, even setting the source and
stylesheet names can not be done the same way for all systems.

> is it useful to desire a portable way to do this?
it's only a minor issue in any case, the difference beween

saxon9  it=main style.xsl +doc1=file1.xml 

<xsl:param name="doc1"/>
<xsl:value-of select="$doc1/a/b/c"/>


saxon9  it=main style.xsl doc1=file1.xml 

<xsl:param name="doc1"/>
<xsl:value-of select="doc($doc1)/a/b/c"/>

is largely cosmetic, the +param syntax is mainly useful if you have a
stylesheet written for an APi that can naturally accept document nodes
and you want to run it on the command line for some reason.
If you are writing it for the command line in the first place it's as
easy to pass in a stringand then call doc(). One other potential
advantage of +param is that if you pass in a string that's going to be
used as a parameter to doc() it needs to use URI syntax but the +param
symtax can use local system paths (which is useful if your command line
system will auto-complete pathnames for ypu as you type...)


The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

Current Thread