Subject: Re: [xsl] Doctype and namespaces in source/generated files From: Mayo <mayo@xxxxxxx> Date: Fri, 28 May 2004 15:44:16 -0700 |
<snip /><xsl:template match="*[not(namespace-uri())]"> than I simply xsl:copy, and apply templates. This prevents me to specify DOCTYPE or namespaces for xhtml in the source documents, as as soon as I specify them (in the source documents) the match rule will stop working, and strips all my xhtml out.
So close, and yet...
Why not use:
<xsl:template match="*[namespace-uri()='http://www.w3.org/1999/xhtml']">
instead then?
If the result document has to be in the XHTML namespace, define:
xmlns="http://www.w3.org/1999/xhtml"
on your xsl:stylesheet element.
Use the exclude-result-prefixes attribute on xsl:stylesheet to omit other
namespaces in scope for the stylesheet.
For adding the doctype, check the applicable attributes for the xsl:output
element. Use XML as output method, and add doctype-public and doctype-system
with the appropriate values.
Thanks, Mayo
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Doctype and namespaces in, Michael Kay | Thread | RE: [xsl] Doctype and namespaces in, Andreas L. Delmelle |
Re: [xsl] Doctype and namespaces in, G. Ken Holman | Date | RE: [xsl] Doctype and namespaces in, Michael Kay |
Month |