[oXygen-user] oXygen vocabulary for XSLT documentation

Florent Georges lists at fgeorges.org
Wed Sep 7 10:00:20 CDT 2011


Alex Jitianu wrote:

  Thanks!  That's helpful info.

> But for now, you can use HTML elements and they will be
> recognized and copied as they are (they must be from namespace
> http://www.w3.org/1999/xhtml in order to be recognized).

  That's what I thought too, so I tried but it didn't work.
But...  I must agree that by "didn't work" I mean it did not
produce the expected visual result in the browser.  But after
your response I looked at the generated HTML source, and it
turned out that the element was there, in the correct namespace,
with the same prefix, but browsers interpret it as XHTML only
when the element name has no prefix...

  So this works, yes, but only when one uses the XHTML namespace
without prefix in the stylesheet itself.  Which is too big a
constraint for me.

  So I changed stylesheet_documentation/xsl/htmlDocToHtml.xsl by
removing:

    <xsl:template match="h:*" mode="documentation">
       <xsl:copy>
          ...

and changing it to:

    <xsl:template match="h:*" mode="documentation">
        <xsl:element name="{ local-name(.) }"
                     namespace="http://www.w3.org/1999/xhtml">
          ...

which should solve the problem, but it does not seem to change
anything in the output (even after I restarted oXygen).  Maybe I
simply picked the wrong stylesheet?

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/


More information about the oXygen-user mailing list