Project

Profile

Help

Can the xsl file specified on the command line be found via an XML catalog?

Added by Matt Wallis over 10 years ago

My command line and response are as follows:

$ java -cp '/opt/local/share/java/saxon9he.jar:/opt/local/share/java/resolver.jar' net.sf.saxon.Transform -s:test.xml -xsl:catalog_test.xsl -catalog:catalog.xml
Stylesheet file catalog_test.xsl does not exist

Should I expect the @-xsl:@ argument to be subject to look-up using the catalog? If the answer is yes, then I must be doing something wrong. The rest of my set-up is as follows:

$ ls
catalog.xml inc.xsl     test.xml    test.xsl

@catalog.xml:@



    
    

@test.xsl:@



  
  
  
	
  

Note that @test.xsl@ includes @catalog_inc.xsl@, just to check that the catalog is working for included stylesheets: when working correctly, @catalog_inc.xsl@ will be resolved to @inc.xsl@ in the current directory:

@inc.xsl:@

?xml version="1.0" encoding="utf-8"?>

  inc.xsl has been included.


If I run the same saxon command without using the stylesheet, I get:

$ java -cp '/opt/local/share/java/saxon9he.jar:/opt/local/share/java/resolver.jar' net.sf.saxon.Transform -s:test.xml -xsl:test.xsl -catalog:catalog.xml
inc.xsl has been included.

... which proves that the catalog is working for the included stylesheet.

So, is catalog-lookup not supported for command line @-xsl:@ parameters?


Replies (1)

RE: Can the xsl file specified on the command line be found via an XML catalog? - Added by Matt Wallis over 10 years ago

I should have said that the problem I am trying to solve is this:

I am writing a makefile that performs XSLT transforms and needs to work on several platforms, where the stylesheets may be installed in different places.

    (1-1/1)

    Please register to reply