You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Ben Stover <bx...@yahoo.co.uk> on 2009/08/13 17:05:23 UTC

Does the XML file have to contains XSL instructions?

When I apply a simple XSL stylesheet on a simple XML file then Xalan v2.7.1 complains about missing xsl-stylesheet instructions in the XML file.

I used a command like the following:

java org.apache.xalan.xslt.Process -in some.xml -xsl convert.xslt

...and got:

Exception in thread "main" java.lang.RuntimeException: No processing instruction found for xml-stylesheet in some.xml.
        at org.apache.xalan.xslt.Process.doExit(Process.java:1155)
        at org.apache.xalan.xslt.Process.main(Process.java:1128)

Why?

I am using java v1.5 under WinXP. 

Ben






Re: Does the XML file have to contains XSL instructions?

Posted by Michael Ludwig <ml...@as-guides.com>.
Ben Stover schrieb:
> When I apply a simple XSL stylesheet on a simple XML file then Xalan
> v2.7.1 complains about missing xsl-stylesheet instructions in the XML
> file.
>
> I used a command like the following:

Like the following?

> java org.apache.xalan.xslt.Process -in some.xml -xsl convert.xslt

This works for me.

> ...and got:
>
> Exception in thread "main" java.lang.RuntimeException: No processing
> instruction found for xml-stylesheet in some.xml.

When trying to sell plain XML as XSL, I get:

   stylesheet requires attribute: version

-- 
Michael Ludwig