OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Unwanted xmlns="" inserted by xsl-ns customization layer

    I'm attempting to customize


    to insert MathJax <script> elements in the <head> of my output documents,
by defining the user.head.content template to include my <script> elements:

<xsl:template name="user.head.content" exclude-result-prefixes="">
    <script type="text/x-mathjax-config">
        MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
    <script type="text/javascript"

    This does output the <script> tags when put through xsltproc (and also
echoes part of the generated document to stdout for reasons I'm unclear on,
but that's a separate weird thing). The problem is that it also adds an
unwanted xmlns="" attribute in the output elements:

    <script xmlns="" type="text/x-mathjax-config">
        MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
    <script xmlns="" type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"/>

    The xmlns="" then prevents the MathJax scripts from executing
correctly. I am trying to figure out how to suppress it. Adding
to the <xsl:stylesheet> element of my customization layer changes
nothing. This kind of makes sense, since the attribute says it
takes a whitespace-separated list of names, while the name I'm
trying to suppress is the empty string. But that seems to be the
extent of the control available over namespaces in the output,
so I'm at a loss now.

    I've attached a test document and stylesheet that behave as
described when run with the xsl-ns stylesheets rev 1.78.1 and

xsltproc --nonet --xinclude test.xsl test.db

    I'm guessing I've run into some sort of conceptual misunderstanding
of how XSLT treats namespaces, but haven't been able to find the right
documentation to clear it up, yet.

    Jon Leech
<refentry xmlns="http://docbook.org/ns/docbook"; version="5.0" xml:id="test">
        <refpurpose>set the viewport</refpurpose>
                <funcdef>void <function>glTest</function></funcdef>
                <paramdef>GLint <parameter>x</parameter></paramdef>

Attachment: test.xsl
Description: application/xslt

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]