[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Tell me agian why I need mml:?
Steven T. Hatton wrote:
> The problem is with MathML, the namespace stuff becomes a big issue. I don't
> believe RELAX NG solves that unless the XSLT processor can work with
> something other than DTDs.
XSLT (1.0) processor is completely uninterested in schema language used.
> What's the deal with not having MathML in DocBook V5?
Probably nobody have time to implement it yet?
> If that isn't
> available, I have very little use for DocBook in terms of authoring
> mathematical text.
Actually it is very easy to extend DocBook 5.0 with MathML. Just grab
MathML schema from
http://yupotan.sppd.ne.jp/relax-ng/mml2.html
And then create following simple DocBook 5.0 + MathML schema:
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<include href="docbook.rng">
<define name="db._any.mml">
<externalRef href="mathml/mathml2.rng"/>
</define>
<define name="db._any">
<element>
<anyName>
<except>
<nsName ns="http://docbook.org/ns/docbook"/>
<nsName ns="http://www.w3.org/1999/xhtml"/>
<nsName ns="http://www.w3.org/1998/Math/MathML"/>
</except>
</anyName>
<zeroOrMore>
<choice>
<attribute>
<anyName/>
</attribute>
<text/>
<ref name="db._any"/>
</choice>
</zeroOrMore>
</element>
</define>
</include>
</grammar>
With this schema, you can write and validate things like:
<article xmlns="http://docbook.org/ns/docbook" version="5.0">
<title>MathML test</title>
<equation>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mn>3</mn> <!-- Actually any MathML can be here -->
</math>
</equation>
</article>
--
------------------------------------------------------------------
Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz
------------------------------------------------------------------
Profesionální školení a poradenství v oblasti technologií XML.
Podívejte se na náš nově spuštěný web http://DocBook.cz
Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------
Nejbližší termíny školení: XML schémata (včetně RELAX NG) 7.-9.11.
*** DocBook 5.-7.12. *** XSL-FO 19.-20.12. ***
------------------------------------------------------------------
S/MIME Cryptographic Signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]