You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mario Madunic <ha...@imag.net> on 2008/01/03 19:03:27 UTC

saxon extension via

I would like to use the line-number() extension provided by Saxon when parsing
my xml files. So far I've not been able to pass the -l arg.

<xslt in="${p_InstallDir}/doNotDelete/keep.xml"
out="${p_InstallDir}/finished/${p_ReportName}.xml"
includes="*.${p_IncludeExtensions}" style="${p_InstallDir}/XSLT/master.xsl">
  <param name="-l" expression="true" />
</xslt>

Has anyone have any insight into this?

Thanks

Marijan (Mario) Madunic



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: saxon extension via

Posted by Mario Madunic <ha...@imag.net>.
Martin

Have it running fine at the command line (not tested it from ant yet) and have
removed the saxon:line-number() so i can test the output. Everthing basically is
running fine, need to refine output. I'll quickly test your recommendation and
get back to you.

Thanks

Marijan (Mario) Madunic

Quoting Martin Gainty <mg...@hotmail.com>:

> 
> Hi Mario
> if I understand this is an XSLT transform?
> I would run XSLT command (at command line) first 
> java -jar saxon.jar input.xml input.xsl [params]
> http://saxon.sourceforge.net/saxon6.5.2/instant.html(just to make sure the
> classpath is setup correctly)then automate with ant java task
> http://ant.apache.org/manual/CoreTasks/java.html
>  
>        <java jar="saxon9.jar"           fork="true"          
> failonerror="true"           maxmemory="128m"           >         <arg
> value="Input.xml Input.xsl [params]"/>         <classpath>          
> <pathelement location="saxon9.jar"/>           <pathelement
> path="${java.class.path}"/>         </classpath>       </java>
> Does this help?Martin______________________________________________Disclaimer
> and confidentiality noteEverything in this e-mail and any attachments relates
> to the official business of Sender. This transmission is of a confidential
> nature and Sender does not endorse distribution to any party other than
> intended recipient. Sender does not necessarily endorse content contained
> within this transmission.> Date: Thu, 3 Jan 2008 10:03:27 -0800> From:
> hajduk@imag.net> To: user@ant.apache.org> Subject: saxon extension via
> <xslt>> > > I would like to use the line-number() extension provided by Saxon
> when parsing> my xml files. So far I've not been able to pass the -l arg.> >
> <xslt in="${p_InstallDir}/doNotDelete/keep.xml">
> out="${p_InstallDir}/finished/${p_ReportName}.xml">
> includes="*.${p_IncludeExtensions}" style="${p_InstallDir}/XSLT/master.xsl">>
> <param name="-l" expression="true" />> </xslt>> > Has anyone have any insight
> into this?> > Thanks> > Marijan (Mario) Madunic> > > >
> ---------------------------------------------------------------------> To
> unsubscribe, e-mail: user-unsubscribe@ant.apache.org> For additional
> commands, e-mail: user-help@ant.apache.org> 
> _________________________________________________________________
> i’m is proud to present Cause Effect, a series about real people making a
> difference.
> http://im.live.com/Messenger/IM/MTV/?source=text_Cause_Effect



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: saxon extension via

Posted by Mario Madunic <ha...@imag.net>.
Martin, I had the wrong namespace for saxon and once that was corrected
everything is working great.

Thanks for your help.

Marijan (Mario) Madunic

Quoting Martin Gainty <mg...@hotmail.com>:

> 
> Hi Mario
> if I understand this is an XSLT transform?
> I would run XSLT command (at command line) first 
> java -jar saxon.jar input.xml input.xsl [params]
> http://saxon.sourceforge.net/saxon6.5.2/instant.html(just to make sure the
> classpath is setup correctly)then automate with ant java task
> http://ant.apache.org/manual/CoreTasks/java.html
>  
>        <java jar="saxon9.jar"           fork="true"          
> failonerror="true"           maxmemory="128m"           >         <arg
> value="Input.xml Input.xsl [params]"/>         <classpath>          
> <pathelement location="saxon9.jar"/>           <pathelement
> path="${java.class.path}"/>         </classpath>       </java>
> Does this help?Martin______________________________________________Disclaimer
> and confidentiality noteEverything in this e-mail and any attachments relates
> to the official business of Sender. This transmission is of a confidential
> nature and Sender does not endorse distribution to any party other than
> intended recipient. Sender does not necessarily endorse content contained
> within this transmission.> Date: Thu, 3 Jan 2008 10:03:27 -0800> From:
> hajduk@imag.net> To: user@ant.apache.org> Subject: saxon extension via
> <xslt>> > > I would like to use the line-number() extension provided by Saxon
> when parsing> my xml files. So far I've not been able to pass the -l arg.> >
> <xslt in="${p_InstallDir}/doNotDelete/keep.xml">
> out="${p_InstallDir}/finished/${p_ReportName}.xml">
> includes="*.${p_IncludeExtensions}" style="${p_InstallDir}/XSLT/master.xsl">>
> <param name="-l" expression="true" />> </xslt>> > Has anyone have any insight
> into this?> > Thanks> > Marijan (Mario) Madunic> > > >
> ---------------------------------------------------------------------> To
> unsubscribe, e-mail: user-unsubscribe@ant.apache.org> For additional
> commands, e-mail: user-help@ant.apache.org> 
> _________________________________________________________________
> i’m is proud to present Cause Effect, a series about real people making a
> difference.
> http://im.live.com/Messenger/IM/MTV/?source=text_Cause_Effect



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: saxon extension via

Posted by Martin Gainty <mg...@hotmail.com>.
Hi Mario
if I understand this is an XSLT transform?
I would run XSLT command (at command line) first 
java -jar saxon.jar input.xml input.xsl [params]
http://saxon.sourceforge.net/saxon6.5.2/instant.html(just to make sure the classpath is setup correctly)then automate with ant java task
http://ant.apache.org/manual/CoreTasks/java.html
 
       <java jar="saxon9.jar"           fork="true"           failonerror="true"           maxmemory="128m"           >         <arg value="Input.xml Input.xsl [params]"/>         <classpath>           <pathelement location="saxon9.jar"/>           <pathelement path="${java.class.path}"/>         </classpath>       </java>
Does this help?Martin______________________________________________Disclaimer and confidentiality noteEverything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.> Date: Thu, 3 Jan 2008 10:03:27 -0800> From: hajduk@imag.net> To: user@ant.apache.org> Subject: saxon extension via <xslt>> > > I would like to use the line-number() extension provided by Saxon when parsing> my xml files. So far I've not been able to pass the -l arg.> > <xslt in="${p_InstallDir}/doNotDelete/keep.xml"> out="${p_InstallDir}/finished/${p_ReportName}.xml"> includes="*.${p_IncludeExtensions}" style="${p_InstallDir}/XSLT/master.xsl">> <param name="-l" expression="true" />> </xslt>> > Has anyone have any insight into this?> > Thanks> > Marijan (Mario) Madunic> > > > ---------------------------------------------------------------------> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org> For additional commands, e-mail: user-help@ant.apache.org> 
_________________________________________________________________
i’m is proud to present Cause Effect, a series about real people making a difference.
http://im.live.com/Messenger/IM/MTV/?source=text_Cause_Effect

Re: saxon extension via

Posted by Mario Madunic <ha...@imag.net>.
Actually got it working once Andrew W. informed me, I had the wrong namespace
for saxon.

			<exec executable="java">
				<arg line="-jar ${env.ANT_HOME}\lib\${p_SaxonJar} -l:on
-o:${p_InstallDir}\finished\${p_ReportName}.html
-s:${p_InstallDir}\doNotDelete\keep.xml -xsl:${p_InstallDir}\XSLT\master.xsl
cl_ParentElement=${p_ParentElement} cl_ChildElement=${p_ChildElement}
cl_SourceFileDir=${p_SourceFileDir} cl_IncludeExtensions=${p_IncludeExtensions}" />
			</exec>

Marijan (Mario) Madunic

Quoting Dominique Devienne <dd...@gmail.com>:

> On Jan 3, 2008 12:03 PM, Mario Madunic <ha...@imag.net> wrote:
> > I would like to use the line-number() extension provided by Saxon when
> parsing
> > my xml files. So far I've not been able to pass the -l arg.
> >
> > <xslt in="${p_InstallDir}/doNotDelete/keep.xml"
> > out="${p_InstallDir}/finished/${p_ReportName}.xml"
> > includes="*.${p_IncludeExtensions}"
> style="${p_InstallDir}/XSLT/master.xsl">
> >   <param name="-l" expression="true" />
> > </xslt>
> 
> You are confusing passing a param to the stylesheet, and passing a
> param to the Saxon main entry point. The nested <param> is a
> stylesheet parameter, as specified by the XSLT spec. There's no way to
> pass the -l comand-line flag to Saxon, as Ant is using the generic
> Trax API to configure the transformation engine. You'd need to invoke
> the Saxon main directly using <java> to be able to pass -l to it. --DD
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: saxon extension via

Posted by Dominique Devienne <dd...@gmail.com>.
On Jan 3, 2008 12:03 PM, Mario Madunic <ha...@imag.net> wrote:
> I would like to use the line-number() extension provided by Saxon when parsing
> my xml files. So far I've not been able to pass the -l arg.
>
> <xslt in="${p_InstallDir}/doNotDelete/keep.xml"
> out="${p_InstallDir}/finished/${p_ReportName}.xml"
> includes="*.${p_IncludeExtensions}" style="${p_InstallDir}/XSLT/master.xsl">
>   <param name="-l" expression="true" />
> </xslt>

You are confusing passing a param to the stylesheet, and passing a
param to the Saxon main entry point. The nested <param> is a
stylesheet parameter, as specified by the XSLT spec. There's no way to
pass the -l comand-line flag to Saxon, as Ant is using the generic
Trax API to configure the transformation engine. You'd need to invoke
the Saxon main directly using <java> to be able to pass -l to it. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org