|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to preserve a node's value containing escaped text (&apo
Hello, I'm new to the list, and I apologize in advance for any newcomer mistakes. A few of the problems I was having were answered by reading the FAQ. One remained, however. Given the following input XML: <InputText>< > & ' "</InputText> And the following XSL: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" omit-xml-declaration="yes" /> <xsl:template match="InputText"> <OutputText> <xsl:value-of select="." /> </OutputText> </xsl:template> </xsl:stylesheet> I was hoping to get the following output: <OutputText>< > & ' "</OutputText> Instead, I get: <OutputText>< > & ' "</OutputText> Is there a way to keep ' and " preserved? I also tried select="text()" as well, but no luck. Of course, this is all part of a much bigger transformation, but in this instance I need to preserve the text contained within the InputText element. I'm going from XML to XML, by the way. I'm using XT and XP from James Clark's page. Will <xsl:copy> or somesuch do the trick? I do not, however, wish to copy the element, just the text, as I'll be adding attributes to the element. I don't want to copy children either. If this is answered in the FAQ but I just didn't see it for what it is then I apologize. Thanks, Brian Young XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








