Passing parameters to saxon on windows 2000 system ?

Discussion in 'XML' started by klaus, Jun 27, 2006.

  1. klaus

    klaus Guest

    Hello,

    I want to pass a parameter to an xslt using saxon on a windoes 2000
    system.
    I'm using this command line in a batch file:

    java -jar c:\programme\saxon\saxon8.jar -v -novw -o
    ...\html_files\output.html ..\xml_files\input.xml
    ...\xslt\xml2html.xsl language=EN

    The problem is the last parmater for saxon "language=EN" this parameter
    is split by (the dos box ?) to two paramters "langauge" and "EN" ang
    the "=" has gone.

    I checked this behavior using another batchfile just used to report the
    paramters (echo %1 %2 %3 ...)

    Of course saxon doesn't understand this paramter when it's split into
    two.

    How can a variable of an xslt be set by saxon using a command line on a
    windows 2000 system (maybe it's also a problem on other version of
    windows) ?

    Regards

    Klaus
    klaus, Jun 27, 2006
    #1
    1. Advertising

  2. klaus

    George Bina Guest

    Hi Klaus,

    You can specify a command line parameter that contains characters that
    may split that in multiple parameters if you enclose it in quotes, so
    try "language=EN" instead of language=EN.

    Best Regards,
    George
    ---------------------------------------------------------------------
    George Cristian Bina
    <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
    http://www.oxygenxml.com


    klaus wrote:
    > Hello,
    >
    > I want to pass a parameter to an xslt using saxon on a windoes 2000
    > system.
    > I'm using this command line in a batch file:
    >
    > java -jar c:\programme\saxon\saxon8.jar -v -novw -o
    > ..\html_files\output.html ..\xml_files\input.xml
    > ..\xslt\xml2html.xsl language=EN
    >
    > The problem is the last parmater for saxon "language=EN" this parameter
    > is split by (the dos box ?) to two paramters "langauge" and "EN" ang
    > the "=" has gone.
    >
    > I checked this behavior using another batchfile just used to report the
    > paramters (echo %1 %2 %3 ...)
    >
    > Of course saxon doesn't understand this paramter when it's split into
    > two.
    >
    > How can a variable of an xslt be set by saxon using a command line on a
    > windows 2000 system (maybe it's also a problem on other version of
    > windows) ?
    >
    > Regards
    >
    > Klaus
    George Bina, Jun 27, 2006
    #2
    1. Advertising

  3. klaus

    klaus Guest

    Hi George,

    I tried to encolse the parameter in quotes, but I thougt that saxon
    could not read the parameter then, because my variable wasn't defined
    in the XSLT.

    Now I found that I needed a <xsl:param name="variablename"/> statement
    in the XSLT.
    So passing the parameters in quotes "variablename=variablevalue" is the
    correct solution.

    Thank you for the hint

    Regards
    Klaus
    klaus, Jun 28, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    2
    Views:
    870
    dave wanta
    Jul 11, 2003
  2. Collin VanDyck

    How to force use of SAXON xslt processor?

    Collin VanDyck, Apr 2, 2004, in forum: Java
    Replies:
    1
    Views:
    640
    Collin VanDyck
    Apr 2, 2004
  3. Johannes Busse

    saxon document() location

    Johannes Busse, Jun 30, 2003, in forum: XML
    Replies:
    1
    Views:
    973
    Johannes Busse
    Jul 1, 2003
  4. Johannes Busse

    saxon document() location

    Johannes Busse, Jun 30, 2003, in forum: XML
    Replies:
    0
    Views:
    1,007
    Johannes Busse
    Jun 30, 2003
  5. ted
    Replies:
    1
    Views:
    418
    Dimitre Novatchev [MVP XML]
    Feb 16, 2004
Loading...

Share This Page