Re: [xslt] Executing xslt scripts



On Thu, Jan 26, 2006 at 10:47:33AM -0500, Scott Bronson wrote:
> I would like to be able to execute xsltfiles directly.  For instance,
> given the file:
>         
>         #!/usr/bin/xsltproc
>         <xsl:stylesheet version="1.0"
>         xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>           <xsl:template match="node()|@*">
>             <xsl:copy>
>               <xsl:apply-templates select="@*|node()"/>
>             </xsl:copy>
>           </xsl:template>
>         </xsl:stylesheet>

  that's no more XML so that's not XSLt anymore.

> I would like to be able to run
> 
>     ./tt.xslt < in.xml > out.xml
> 
> and have everything just work.

I don't see why 

  xsltproc tt.xslt - < in.xml > out.xml

is much more complex.

> - It makes chaining xslt pipelines easier:
> 
>    cat myfile | ./transform1 | ./transform2 > out.xml

  cat myfile | xsltproc ./transform1 - | xsltproc ./transform2 - > out.xml

  no I really don't see the problem

> 
> - It makes filters much easier to specify in programs.  Right now, to
> specifyiing xslt filters in liferea is a drag.  You need to type
> "xsltproc ~/transform.xslt -" -- a 3 arguments.  If tt.xslt were an
> executable file, then you could specify it as you do any other filter,
> with a standard file dialog.  That's much easier!

  not that much easier, but certainly breaking the spec

> - It would make my life nicer to not have to have to write shell script
> to automate simple transforms.

  I don't know why 3 args forces to write a shell script.
  But I certainly know this would simply break XML conformance and that 
is really not an option. Sorry, no !

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]