This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: How do you get the non-transformed character entity out of MSXML3.0


Jim -
If you modify your XPath statement to be /somenode/@someattribute/text()
when you're doing selectSingleNode, then using the node.xml will return you
the <.  That will get you what you want, but I'll add my support to the
rest here.  If you're doing that, you're probably going about things wrong.
Programatically, treat your XML as the DOM objects rather than as text.
Create a new DOM document object, add nodes to it, and if you need to have
it in a text file somewhere, dump it out at that point.  If you deal with
XML as text, you will run into the issues you're running into and probably
some others.  If you choose to go down this route, you've been warned
(multiple times now).  At any rate, I hope that helps.

-Nate
naustin@idsgrp.com

> Date: Mon, 17 Sep 2001 12:27:41 -0500
> From: jdgarrett@alltel.net
> Subject: RE: [xsl] How do you get the non-transformed 
> character entity out of MSXML3.0
> 
> David
> I tried the .text method on the MSXML parser
> and it will return the transformed value
> of the character entity...
> 
> e.g.
> given 
>  < 
> as a value in an attribute
> the MSXML parser will not return  < 
> but instead returns < when accessing .text
> 
> It appears there is not a method or property
> that will return only the notyettransformed
> value of the attribute....
> 
> this was all discussed in previous postings...
> Thanks
> Jim
> 
> |-----Original Message-----
> |From: owner-xsl-list@lists.mulberrytech.com
> |[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of David
> |Carlisle
> |Sent: Monday, September 17, 2001 7:52 AM
> |To: xsl-list@lists.mulberrytech.com
> |Subject: Re: [xsl] How do you get the non-transformed 
> character entity
> |out of MSXML3.0
> |
> |
> |
> |> what is required here is the ability to keep it
> |> in a certain state (meaning untransformed) 
> |
> |If you give &lt; to an XML parser it will return <
> |If you don't want that to happen do not use an XML parser on 
> the file,
> |just read it as text.
> |
> |As XSLT always uses an XML parser on the input it has no 
> idea that the
> |original file had &lt; in it just as it has no idea whether the
> |attribute had " or ' around its value. Such syntactic issues are
> |not passed on by an XML parser to the application.
> |
> |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.
> |
> | XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> |

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]