OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

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

RE: [xml-dev] XSLT Preserve Space in Attributes

Thanks for the replies. I'll have words with the appropriate people about passing the code in elements rather than attributes. In the meantime I still have this problem ;-)

At 17:51 21.11.2001 +0000, you wrote:
is it possible to preserve space in attribute values when passing them to a XSLT processor?
Attribute values are normalized according to XML rules before the XSLT processor gets to see them. This means newlines are converted to spaces.

Is there any means to override this in the XML parser? I also figure that after the conversion process there is no means to 'recover' the newlines that were stripped.

 This means it isn't a good idea to put JavaScript code in XML attributes, because newlines in JavaScript are significant - for example, a newline can terminate a comment, so replacing it by a space is bad news.
Mike Kay

Oh dear! If anyone has any ideas how to get around this problem, I'd be pleased to hear it.


Lyndon J B Nixon ... MAGIC Centre, FHG FOKUS ... Berlin, Germany
"what is now proved was once only imagined" - william blake
PhD Student, Integration of Internet with MPEG-4 & MPEG-7
nixon@fokus.fhg.de   members.tripod.co.uk/~madeejit/phd.htm