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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] Tell me agian why I need mml:?


Hi,

On Sunday 06 November 2005 15:05, Steven T. Hatton wrote:
> [...]
> I don't think it's using RELAX NG at all. When I run xsltproc on the
> following XML file:
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML 5.0b1//EN"
> "http://www.oasis-open.org/docbook/xml/5.0b1/dtd/docbook.dtd";>
> <book>
>   <title>Simple Book</title>
>   <chapter>
>     <title>Simple Chapter</title>
>     <para>Simple Paragraph.</para>
>   </chapter>
> </book>
>
> it seems to be reading directly from the URL.

If it does, your XML catalogs misses the public DocBook identifier. You 
need probably a <public/> entry that points to your DocBook v5.0b1 DTD. 
See [1] and:

   <public
     publicId="-//OASIS//DTD DocBook XML V5.0b1//EN"
     uri="..."/><!-- Fill the path + docbook.dtd here -->


> But it produces the 
> error I posted.  If I repace the DOCTYPE with
>
> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML 4.5//EN"
> "http://www.oasis-open.org/docbook/xml/4.5CR1/docbookx.dtd";>
>
> It processes successfully.

Yes, because this version is probably known by your XML catalogs.

However, it seems that you mix up two things: The DTD and the RELAX NG 
validation. Although the structure is (or should be) the same, there 
might be some things where the two are different (one example would be 
the famous namespace handling.) 

If you work with a RELAX NG only toolchain, you should omit this 
declaration; see also [2]. Don't try to use both. Unfortunatly that gives 
you some small problems with entities.

If you want to work with RELAX NG and still want to use entities, try 
this:

<!DOCTYPE book [
  <!-- If you need entities, put here some declarations like this: -->
  <!ENTITY % ISOtech PUBLIC
   "ISO 8879:1986//ENTITIES General Technical//EN//XML"
   "isotech.ent">
  %ISOtech;
]>

Your XML catalog must contain an entry of this public identifier, 
otherwise it will not work. See the file "dbcentx.mod" in your DocBook 
DTD distribution.


> The Saxon8.6 with xsl2 is producing other errors
> [...]

I can't say anything about that.


> [...]
> > What you can do is:
> >
> > 1. Stick to the stable DocBook v4.{3,4} DTD and live with the
> > namespaces oddities or
>
> 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.

I think you miss something here. In general before you transform your 
documents, you should validate it first. After a successful validation 
(either RELAX NG or DTD), you can hand it over to the XSLT step. 


> [...]
> What's the deal with not having MathML in DocBook V5?

Do you know [3]?


> If that isn't 
> available, I have very little use for DocBook in terms of authoring
> mathematical text.

Well, I am sure that is is a matter of correct configuration only.


> I'm sure there are ways to persuade DocBook to work 
> with MathML even if it is not part of the specification.  Of course
> that means learning yet more about the details of DocBook and the
> associated tools. Perhaps the thing to do is to fork a MathDoc project
> off of DocBook Simplified.

DocBook + MathML were always a rough friendship ;) as I remember, but I 
think it will progress if the tools become more and more stable. You are 
in a state of transition and get all this problems because those things 
are not finished yet. :)


> I'm sure me and the other person on the 
> planet who's interested in such a product could probably get something
> working.  BTW, do you happen to know that other person's name.  I could
> use some help!

I think you should check your XML environment more carefully, because it 
seems there is somewhere an error:

1. Check the XML catalogs, the public and system identifiers and if they 
resolve successfully. Especially have an eye to the entities' public 
identifiers (see above.) Use xmlcatalog for debugging purposes which is 
part of the libxml2 library.

2. Try to validate it with RELAX NG or the DTD and if there are errors: 
fix it or go back to 1.

3. You can even try to validate different XML documents in different 
DocBook DTD versions just to make sure everything is set up proberly.

4. If you are sure, you have done everything correct, then, and only then 
try to transform your DocBook documents. 

5. If there are no errors, you can try to add MathML functionality into 
DocBook, either with the DocBook DTD module or with RELAX NG.

6. Try to validate DocBook documents with MathML

7. Try to transform those documents.


It seems like a lot of work, but it is crucial that your XML environment 
is set up correctly. Otherwise you end up with gray hair. ;)

Good luck,
Tom


-----------
[1] http://www.sagehill.net/docbookxsl/Catalogs.html
[2] http://www.docbook.org/docs/howto/
[3] http://www.sagehill.net/docbookxsl/Math.html
[4] http://www.docbook.org/xml/5.0b1/rng/docbookxi.rng

-- 
Thomas Schraitle


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