docbook-apps

Re: [docbook-apps] Re: Docbook: Customising DTD to allow xinclude in place of...

  • 1.  Re: [docbook-apps] Re: Docbook: Customising DTD to allow xinclude in place of...

    Posted 01-15-2008 23:46

    Paul
    I had the same problem a few months ago. I am using Saxon 6.5.5 and Fop 0.94
    with the Jeuclid plugin.

    I modified the DTD this way:

    (graphic+|mediaobject+|mathphrase+|mml:math))">
    (inlinegraphic+|inlinemediaobject+|mathphrase+|mml:math))">

    and my xincluded file "myequation.xml" looked like:


    "_http://www.w3.org/TR/MathML2/dtd/mathml2.dtd_
    (http://www.w3.org/TR/MathML2/dtd/mathml2.dtd) " [


    ]>
    <mml:math xmlns:mml="_http://www.w3.org/1998/Math/MathML_
    (http://www.w3.org/1998/Math/MathML) " id="mymath">

    <mml:mrow>
    <mml:mo>∑</mml:mo>
    <mml:mn>4</mml:mn>
    <mml:mo>+</mml:mo>
    <mml:mi>x</mml:mi>
    </mml:mrow>
    </mml:math>

    And the way it was xincluded in the docbook file:
    <equation >
    <xi:include xmlns:xi="_http://www.w3.org/2001/XInclude_
    (http://www.w3.org/2001/XInclude) " href="myequation.xml"/>
    </equation>

    I think that you got pretty close.

    Hope this helps,

    Dean Nelson



    In a message dated 1/15/2008 2:27:48 P.M. Pacific Standard Time,
    paul.suckling@gmail.com writes:

    Dear all

    I have been searching for the answer to a problem in the mailing list
    archives, but haven't been able to find it. I am hoping you might be
    able to help me out.

    I have previously followed the instructions here
    (http://www.sagehill.net/docbookxsl/MathML.html) that show how to
    customise the DTD to allow MathML to be included within equation,
    inlineequation and informalequation elements.

    I have just decided to follow the instructions here
    (http://www.sagehill.net/docbookxsl/ValidXinclude.html), which explain
    how to customise the DocBook DTD to allow xincludes in place of
    various elements. I would like to extend this to allow xincludes in
    place of the mml:math element within equation, inlineequation and
    informalequation elements, so that something like

    <equation>
    <xi:include href="math.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
    </equation>

    will validate too (using xmllint).

    I guess I need to extend the examples given in the references above by
    adding lines similar to





    to my DTD but I don't know the correct syntax.

    Can someone (Bob) help me out here please?

    Thank you,

    Paul

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org






    **************Start the year off right. Easy ways to stay in shape.
    http://body.aol.com/fitness/winter-exercise?NCID=aolcmp00300000002489