← Prev in month ← Prev in thread
Next in thread → Next in month →

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

From
<>
Date
2008-01-15T23:46:18+00:00
ID
Thread
Re: [docbook-apps] Re: Docbook: Customising DTD to allow xinclude in place of...
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:

 

<!ENTITY % 
equation.content            
"(alt?, (graphic+|mediaobject+|mathphrase+|mml:math))">
<!ENTITY % 
inlineequation.content    "(alt?, 
(inlinegraphic+|inlinemediaobject+|mathphrase+|mml:math))">

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

 

<?xml version="1.0" encoding="utf-16"?>
     
<!DOCTYPE mml:math PUBLIC "-//W3C//DTD MathML 
2.0//EN"
        "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd" 
[
        <!ENTITY % MATHML.prefixed 
"INCLUDE">
        <!ENTITY % 
MATHML.prefix "mml">
        
]>
<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" 
id="mymath"> 
  <!-- <mml:math 
id="mymath">-->
    
<mml:mrow>
    
<mml:mo>&sum;</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 ><title>Here is a nice 
equation</title>
      <xi:include 
xmlns:xi="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, 
 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

<!ENTITY % equation.mml:math.content "| 
  xi:include">
<!ENTITY % inlineequation.mml:math.content "| 
  xi:include">
<!ENTITY % informalequation.mml:math.content "| 
  xi:include">

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: 
For 
  additional commands, e-mail: 
  

Start the year off right.  Easy ways to stay in shape in the new year.
← Prev in month ← Prev in thread
Next in thread → Next in month →