[
Lists Home |
Date Index |
Thread Index
]
Michael (et al),
With acknowledgement that there is a better place to post xform
questions, I wanted to let you know that I got it working, thanks
to your lead. Because both MSXML and XML Spy were producing the same
results, I was skeptical that it was a tool issue, thinking that it
must be more of a stylesheet problem. But when Saxon produced the
desired results, I was inspired to revisit the tool setup and found the
answer.
I am invoking MSXML through ASP, and was setting the
preserveWhiteSpace property on the DOM object to true, and it wasn't
working. But I was doing it after the loading of the XML doc, not
realizing that the whitespace was stripped on the load itself. Once I
set the property prior to the load, all became well. As
in:
xml = Server.CreateObject("Microsoft.XMLDOM");
xml.async = false;
xml.preserveWhiteSpace = true;
xml.load(Server.MapPath("MyFile.xml"));
Thanks to all for your help, and you may resume meaning of life
discussions.
Russ
-------- Original Message -------- Subject: RE:
[xml-dev] Preserving whitespace between nodes - XSLT From: "Michael
Kay" <mike@saxonica.com> Date: Fri, December 02, 2005 3:13
pm To: <russ@weststreetconsulting.com>,
<xml-dev@lists.xml.org>
> I have an XSLT question that
I'm unable to answer, and I'm starting to > think there may not
be an answer. Before I give up, allow me > to consult your
expertise.
XSLT coding questions are best asked on xsl-list at
mulberrytech.com. This list prefers to discuss the meaning of
life. > > I'm trying to preserve significant whitespace
between element nodes > during transformation.
Just avoid
using MSXML3, and you should be fine.
Seriously: Microsoft's XSLT
processor is the only one that throws away whitespace text nodes by
default. There's an option to suppress this behavior, but only if
you invoke the processor using its API, not if you run it from an
<?xml-stylesheet?> directive in internet explorer. If you
do that, the spaces disappear and there's nowt you can do about
it.
Michael Kay http://www.saxonica.com/
|