Re: [xml] xsl:copy and line breaks between attributes
- From: Igor Zlatkovic <igor zlatkovic com>
- To: Oliver Kiddle <okiddle yahoo co uk>
- Cc: xml gnome org
- Subject: Re: [xml] xsl:copy and line breaks between attributes
- Date: Wed, 02 Jun 2004 17:28:39 +0200
On 02.06.2004 11:27, Oliver Kiddle wrote:
Igor Zlatkovic wrote:
That is exactly what bothers you, no? Most unfortunate, I see Xalan
doing the same:
Yes, that's exactly what bothers me. I tried sablotron too and it
looses a good few of the other newlines too. I appreciate that what it
is doing is perfectly valid and in XML terms, both files are the same.
But it is unfortunate because it means XSLT can't be used in this sort
of situation.
I was hoping, that maybe the XML parser had enough information around
internally that it would be possible to make it pull out the original
element from the input.
You can use some stream editing tool (sed, or its like) and try to edit
a file with that. It may or may not be possible to do, depends on the
sed wouldn't be powerful enough to make the edits and most of the logic
is already there in XSLT. My best hope is perhaps to try to make the
XSLT output the changes in the form of a sed script. Is it possible to
get at line numbers within XSLT? I'd assume xsltproc has them somewhere
for producing error messages?
xsltproc doesn't have them, libxml does. You could discover the line
number from within a C program, but XSLT offers no means known to me for
achieving this.
Ciao,
Igor
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]