[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Question About Translate Function
Hi Greg, If I put your example into a xml document, say <?xml version="1.0" encoding="UTF-8"?> <doc> <myXmlElementName>myXmlElementText</myXmlElementName> </doc> then its perfectly valid and the < and > get resolved by the parser. For the xls stylesheet its identical to: <?xml version="1.0" encoding="UTF-8"?> <doc> <myXmlElementName>myXmlElementText</myXmlElementName> </doc> so where is the need to translate? Regards Manfred On 27/11/05, floatingisland@xxxxxxx <floatingisland@xxxxxxx> wrote: > Thank for the response, Mr. Kay. Sorry, I didn't format my original > e-mail properly, so that's not really the question I intended to ask. > Let me try to re-state my original question once more as follows: > > Using the XSLT translate function, is there a way to change > < to < and > to >. I have an XML document, saved out > of Microsoft InfoPath, which changes the XML tags pasted into > a text box into a text string of (for example) > > <myXmlElementName>myXmlElementText</myXmlElementName> > instead of <myXmlElementName>myXmlElementText</myXmlElementName> > > I'm using Apache Cocoon Version 2.0.3. > This is the translate function that I'm using: > <xsl:value-of select="translate(//myXmlElementName, '<', '<')" /> > <xsl:value-of select="translate(//myXmlElementName, '>', '>')" /> > > This is part of the error message that Cocoon generates: > > The value of attribute "select" must not contain the '<' character. > org.apache.cocoon.ProcessingException: Exception in creating Transform > Handler: > org.xml.sax.: SAXParseException: The value of attribute "select" must > not contain the "<" character. > > Any ideas? > > Thanks, > > Greg
|
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
|