|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Moving (promoting) XML elements through XSL
The script worked for you? That's odd. I tried it, but my processor returned the same results as before. My output file still displays the title and body subnodes inside the topic element, but the script deletes the indexterm element. <?xml version="1.0" encoding="utf-8"?> <topic id="i267011"> <title>Software Requirements </title> <body> .. </body> </topic> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output indent="yes"/> <xsl:template match="/topic"> <xsl:copy> <xsl:apply-templates select="@*"/> <prolog> <metadata> <keywords> <xsl:copy-of select="title/indexterm"/> </keywords> </metadata> </prolog> <xsl:apply-templates select="node()"/> </xsl:copy> </xsl:template> <xsl:template match="indexterm"/> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> It looks like the script should work. I'm confounded as to why it doesn't. Thanks, Mark
|
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
|






