Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: XML::LibXSLT generates invalid XHTMLby arturo (Vicar) |
on Jul 19, 2005 at 00:35 UTC ( [id://475938]=note: print w/replies, xml ) | Need Help?? |
Well, the same happens using the default jEdit XSLT Plugin, which (surprise surprise) doesn't use LibXML::XSLT. So it's likely not the processor; so I decided to take a gander at the specs, and I found a nasty little surprise:
I guess they wanted to have a 'sensible' default and this made sense to a sufficient number of people voting on the spec; I don't agree, it seems like an unnecessary bit of processing and it can be surprising. Anyhow, since you're wantin' to output XHTML, you should set the default namespace on your stylesheet element to http://www.w3.org/199/xhtml anyways. What would also "work", from the point of view of closing the meta tag, would be to explicitly declare an xsl:output element with a method attribute of xml. I suggest you do both, because you have to in order to generate valid XHTML. update Actually, what the spec implies is that you only have to add the default namespace in order to get XHTML output. I like adding the xsl:output element anyways, because I usually like to output doctype declarations and set the output encoding explicitly. If not P, what? Q maybe?
In Section
Seekers of Perl Wisdom
|
|