Re: [docbook-apps] Adding a new attribute to EQUATION element

From
Bob Stayton <>
Date
2009-03-10T18:26:22+00:00
ID
008701c9a1ad$aa17cb30$6400a8c0@pazu
Thread
Re: [docbook-apps] Adding a new attribute to EQUATION element
Hi Dean,

If you are going to be customizing the DTD, I would highly recommend 
browsing the LiveDTD version so you can see how and where parameter entities are 
defined:

 

http://www.sagehill.net/livedtd/docbook45/

 

If you click on "equation" in the left column, you find the declarations 
for the equation element in the DTD.  For attributes, you want to look at 
the <!ATTLIST equation ...> part. In there, you will see a 
%local.equation.attrib; parameter entity, and when you click on that you will 
see it is declared as empty.  That is a placeholder for any new 
attributes you care to add to the DTD  All elements have such a PE for 
customization.  It can be declared as:

 

<!ENTITY % local.equation.attrib "width  CDATA  
#IMPLIED">

 

You just need to declare your version before the stock version of that 
parameter entity.

 

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
   

  
To:  ;  
  

  
Sent: Tuesday, March 10, 2009 10:56 
  AM

  
Subject: Re: [docbook-apps] Adding a new 
  attribute to EQUATION element

  

  
Bob,

  
I'm using the 4.5 DTD with a mod file. I have modified the 
  equation.content entry to allow mml:math and xi:include items

  
 

  
<!ENTITY % 
  equation.content            
  "(alt?, 
  (graphic+|mediaobject+|mathphrase+|%mathml-math;+|xi:include))">

  
but I can't figure out how to add a simple attribute ;-) I have tried to 
  use the info out of the latest TDG but it looks like even that is not up to 
  date and there are some wrapping for modules that happen in the new dbpoolx 
  file that I don't understand yet.

  
 

  
There must be a simple way......

  
 

  
 

  
Dean

  
 

  

  
In a message dated 3/10/2009 10:14:44 A.M. Pacific Daylight Time, 
   writes:

  
    
Hi Dean,

    
Are you using a DTD or RNG schema?  And when you 
    mention customization layer, I presume you mean the customization of the 
    schema?

    
 

    
Bob Stayton
Sagehill Enterprises


    
 

    
 

    
 

    
      
----- Original Message ----- 

      
From: 
       

      
To:  
      

      
Sent: Tuesday, March 10, 2009 12:10 
      AM

      
Subject: [docbook-apps] Adding a new 
      attribute to EQUATION element

      

      
Hello everyone,

      
 

      
I have wrestled my stylesheets to accept <equation 
      align="center"> when I am using MathML. All of this works as I would 
      like except validation in the editor.

      
 

      
How do I add the "align" attribute for the EQUATION element to 
      my customization layer so that my XML validates.

      
 

      
 

      
 

      
Regards,

Dean Nelson

"Faith is acting 
      before feeling." - Rick Warren

      
      A Good Credit Score is 700 or Above. See 
      yours in just 2 easy steps! 
  

  

  
  A Good Credit Score is 700 or Above. See 
  yours in just 2 easy steps!