Work Backwards From An Xslt To Create An Xml
So, I have quite a few XSLT files that I need to generate a preview for, however I do not have the corresponding XML files. I was wondering if it was possible to go through an XSLT
Solution 1:
just to give it a shot, also this won't work with multiple templates:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="xsl">
<xsl:output method="xml" indent="yes"/>
<xsl:variable name="xsl-namespace">http://www.w3.org/1999/XSL/Transform</xsl:variable>
<xsl:template match="*[namespace-uri() != $xsl-namespace]" >
<xsl:copy>
<xsl:apply-templates select="@*[namespace-uri() != $xsl-namespace]"/>
<xsl:apply-templates select="*[namespace-uri() != $xsl-namespace]"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@*[namespace-uri() != $xsl-namespace]" >
<xsl:copy/>
</xsl:template>
Post a Comment for "Work Backwards From An Xslt To Create An Xml"