Hello,
I'm trying to process and output xhtml documents, but I'm having some
problems with namespaces. Each source document has extra namespace(s)
(other than the xhtml one) for custom tags (the ones that the xslt
stylesheet will be processing).
The xslt I'm using matches elements in undefined namespaces, and copies
those into the output, and processes the elements in my custom
namespaces. (In other words I want to copy everything other than my
custom namespaces, and process what's not copied)
the match rule i'm using is:
<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.
My quesiton is, is there a better way to do this, or is there any easy
way that I can manipulate what namespaces/doctypes the output files
will have? (I want to strip out my custom namespaces, preserve any
other ones, add the xhtml one, as well as add a doctype to the
generated document).
Ideally, I would like to specify doctype and all the proper namespaces
in the source files.
I've been looking over the "XHTML to XHTML transform"
(http://www.biglist.com/lists/xsl-list/archives/200404/
threads.html#00067) thread from few months ago, but I can't seem to
figure out how the input/output namespaces (and doctype) were handled
there.
thanks,
Mayo Jordanov