[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Setting Namespace on Generated xsl:stylesheet Elem
Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote: > Well, if you enjoy the pain, you can do this: > > <xsl:template match="/"> > <xsl:element name="xsl:stylesheet"> > <xsl:namespace name="xs">http://www.w3.org/2001/XMLSchema</xsl:namespace> > <xsl:attribute name="version">2.0</xsl:attribute> > <xsl:attribute name="exclude-result-prefixes">xs</xsl:attribute> > <xsl:element name="xsl:template"> > <xsl:attribute name="match">/</xsl:attribute> > <xsl:element name="xsl:value-of"> > <xsl:attribute name="select">.</xsl:attribute> > </xsl:element> > </xsl:element> > </xsl:element> > </xsl:template> Ah, hurts so good :-) Seriously, I already had a solution that used <xsl:namespace>. I was looking for a solution that would work in XSLT 1.0. Ideally, the solution would use <xsl:element> to generate elements instead of inserting them literally, but Ken provided a solution that at least works in XSLT 1.0. -- Roger L. Cauvin @rcauvin (Twitter) cauvin.blogspot.com (blog)
|
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
|