[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Tags in text content
Input: <?xml version="1.0" encoding="UTF-8"?> <root> <p><em>Business day</em> means a calendar day.</p> <p>No children.</p> </root> Stylesheet: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:math="http://www.w3.org/2005/xpath-functions/math" exclude-result-prefixes="xs math" version="3.0" expand-text="yes"> <xsl:template match="/"> <root> <xsl:apply-templates/> </root> </xsl:template> <xsl:template match="p"> <xsl:copy> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="text()"> <xsl:sequence select="parse-xml-fragment(.)"/> </xsl:template> </xsl:stylesheet> Output: <?xml version="1.0" encoding="UTF-8"?> <root> <p><em>Business day</em> means a calendar day.</p> <p>No children.</p> </root> Thank you Martin. From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, April 10, 2024 7:03 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Aw: Tags in text content Use the function parse-xml-fragment
|
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
|