This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xsl:param and replace.xsl
- From: "Chris Bayes" <chris at bayes dot co dot uk>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 14 Dec 2001 10:12:34 -0000
- Subject: RE: [xsl] xsl:param and replace.xsl
- Reply-to: xsl-list at lists dot mulberrytech dot com
Mike,
This is a dos question
If you do this
saxon authors.xml replace.xsl > newfile.xml
Of course authors.xml remains untouched because the result is in
newfile.xml.
You cant do this
saxon authors.xml replace.xsl > authors.xml
Because dos opens authors.xml for redirecting to before saxon opens it
so it will be empty and saxon will give you an error on the input file.
Error
java.io.EOFException: no more input
Transformation failed: run-time errors were reported
But you can do this
Saxon -o authors.xml authors.xml replace.xsl
Which will replace authors.xml with the result of the transform.
But as people have said it isn't usualy a good idea to do it but saxon
will not overwrite the output file if there is an error in the transform
;-)
Ciao Chris
XML/XSL Portal
http://www.bayes.co.uk/xml
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of
> Mike Ferrando
> Sent: 13 December 2001 17:58
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] xsl:param and replace.xsl
>
>
> Friends,
> I am trying to process some xml xsl documents from Michael
> Kay's book on page 518 (authors.xml replace.xsl).
>
> My objective is to use the xsl stylesheet to replace text in
> a xml document without creating a new document. But I am
> getting an error when I type the command at the dos prompt
> for saxon. The command line is given in the book.
>
> saxon source.xml replace.xsl replace=author by=***
>
> The error I get is "Source file source.xml does not exist."
>
> So, I typed in "authors.xml" for "source.xml" and I get the
> output in the dos window. I can create a file with it by
> ">newfile.xml", but the authors.xml file is untouched.
>
> Anybody know what I am doing wrong?
>
> Mike F.
>
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list