Subject: Re: Q XSLT: How to copy elements with XT?
From: "Joerg Colberg" <joerg.colberg@xxxxxxxxxxx>
Date: Tue, 26 Sep 100 17:37:04 EDT
|
Vit,
I am copying (x)html, too. Here is the basics of what I do:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes">
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match=" a | applet | b | big | body | br | caption | cite | code | col | colgroup | dd | div | dl | dt | em | font | form | frame | frameset | head | h1 | h2 | h3 | h4 | h5 | h6 | hr | html | i | iframe | img | link | li | map | meta | noframes | ol | p | param | pre | s | script | small | span | strong | style | sub | sup | td | th | title | tr | tt | ul | var | table ">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<!-- ADD YOUR template here -->
</xsl:output>
</xsl:stylesheet>
While this doesn't look too elegant, it copies the html and it
does something else with the other stuff.
Hope this helps,
Joerg
_______________________________
Dr. Joerg M. Colberg
Econovo Software Inc.
joerg.colberg@xxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|