Namespaces inheritance
This is an open discussion with 4 replies, filed under XSLT.
Search
i've run into this issue before. did you remove the xmlns
from the <html>
element? and you only want the xmlns
on that element, correct?
if so, the default install (and what you have posted above) should work:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
and of course the <
should be <.
As I reported before, adding it to "<xsl:stylesheet>" doesn't work
if I add the namespace using
<html xmlns="http://www.w3.org/1999/xhtml">
or
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml">
:-)
well you shouldn't add it to the html
element otherwise it will give you the blank xmlns
in other elements. as far as adding it to the xsl:stylesheet
element, I'm not sure why it's not outputting anything.
what's your xsl look like exactly? can you post the code?
It outputs the same thing as adding it to <html> (ok for <html>, blank for others), I think this is because the "other things" are "imported" from other XSL stylesheets (as I've already said in the first message). Adding it to the <xsl:stylesheet> of every stylesheet seems to work... the problem is adding it to the content of the markdown formatted text.
Create an account or sign in to comment.
In order to be XHTML 1.1 compliant, I've to add
to the <html> element. However, if I add the namespace using
or
it adds the namespace to <html> but it "thinks" I want to add this namespace only to the elements inside the current document, so it resets the namespace of the elements imported from other XSL documents, automatically adding
to that elements.
So... I've added xmlns="http://www.w3.org/1999/xhtml" to the xsl:stylesheet of every XSL document, but it still adds xmlns="" (the "resetting" tag) to the elements inside the written articles (generated by the markdown interpreter?).
Is there a simpler way to propagate this namespace (xmlns="http://www.w3.org/1999/xhtml") from the "master" document to the other documents? If not, how could I specify this namespace for the elements inside the articles?
Thanks :-)