Re: [xslt] multiple files generation directory



On Sun, Jan 26, 2003 at 12:04:55AM +0000, Bro1 wrote:
> Hi,
> 
> thanks for prompt reply.
> 
> On Sat, Jan 25, 2003 at 06:20:58PM -0500, Daniel Veillard wrote:
> > On Sat, Jan 25, 2003 at 11:03:04PM +0000, Bro1 wrote:
> > > $ xsltproc -v -o /tmp/ /home/bro1/editable.xsl bbb.xml
> > 
> >   Read my mail ? apparently no, reread it.
> > paphio:~ -> xsltproc  | grep -- -o
> >         --output file or -o file: save to a given file
> 
> The man xsltproc  really says:
> 
> "-o directory/ directs the output files to a specified directory. The
> directory must already exist."

  The documentation is in error:
    - it should be a file path
    - the directory will be created (unless --nomkdir or --nowrite
      is also specified)

> I have also tried the following command (with full file name):
> $ xsltproc -o /tmp/out.htm /home/bro1/editable.xsl bbb.xml

  okay that's a bug somewhere in the libxslt computation:

  works

paphio:~ -> xsltproc -v -o /tmp/result  editable.xsl bbb.xml
Added namespace: xsl mapped to http://www.w3.org/1999/XSL/Transform
xsltPrecomputeStylesheet: removing ignorable blank node
xsltParseStylesheetProcess : found stylesheet
...
xsltProcessOneNode: applying template 'HTMLPage' for HTMLPage
xsltEvalAttrValueTemplate: html returns html
xsltApplyOneTemplate: copy text
    Sample output.

xsltCopyText: copy text
    Sample output.

Wrote 126 bytes to /tmp/tmp.html
paphio:~ ->

  but 

aphio:~ -> xsltproc -v -o /tmp/result  /u/veillard/editable.xsl bbb.xml
Added namespace: xsl mapped to http://www.w3.org/1999/XSL/Transform
xsltPrecomputeStylesheet: removing ignorable blank node
xsltParseStylesheetProcess : found stylesheet
...
xsltProcessOneNode: applying template 'HTMLPage' for HTMLPage
xsltEvalAttrValueTemplate: html returns html
xsltApplyOneTemplate: copy text
    Sample output.

xsltCopyText: copy text
    Sample output.

Wrote 126 bytes to /u/veillard/tmp.html
paphio:~ ->

  fails, for some reason it takes the XSLT stylesheet as the base for the
output even if a document URL has been specified on the command line.

  It's a bug and I will try to fix it in the next version.

> > Also read http://exslt.org/exsl/elements/document/index.html
> > <exsl:document
> >    href = { uri-reference }
> > 
> >     You can learn about what an URI Reference is and how it is
> > used in RFC 2396
> >        http://www.ietf.org/rfc/rfc2396.txt
> Does not help much :/

  tmp.html is an URI reference, the base used it the containing
document being written, and the computation in RFC 2396 of 
     base = /tmp/result
     href = tmp.html
gives
     url = /tmp/tmp.html

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.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]