[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] XSLT Preserve Space in Attributes
> is it possible to preserve space in attribute values when passing them to a
> XSLT processor?
An XML parser will normalise space in attribute values, converting line
ends to spaces and collapsing multiple white space runs to a single
space.
As XSLT only gets control after the parse, it can not control this
normalisation (but it doesn't do anything else with the attribute value)
> so is there a way to do this or do I need to tell the XML
> authors that the code should be in a text node rather than an attribute?
If you need white space exactly to be preserved then it should not be in
an XML attribute (whether or not you're using XSLT), but mainly
javascript doesn't need this does it?
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.