Re: question aboout P schema and S schema

Chen Fe Pong wrote:
>
> dear sir/madam,
> 
> i have some question about s schema and p schema
> especially for MathML.
> 
> 1.If we want load a mathml document, first we need to
> load the p schema an s schema. 

More precisely, the S schema is loaded first, and then the P schema,
which relies on the S schema.

> There is a LoadPresentationSchema function and
> LoadStructureSchema function. What do these function
> do?

They load the compiled schemas in core memory. But those are
internal functions. You should use the documented API:

   http://www.w3.org/Amaya/User/APIman.toc.html

Refer to section 10.
No need to load a S schema explicitely. This is done by the
functions that create a new document (TtaNewDocument) or
load an existing document from a file (TtaOpenDocument).
Then you associate a P schema with the document with
function TtaSetPSchema.

> These function read form the file *.P or from file
> *.prs ?

From the .STR and .PRS files.

> If it read form *.prs file how should i know the file
> format in order to know what information that i read
> from that file?

Why should you care about this file format? The above function
do the job for you.

> 2. In the function LoadPresentationSchema, what is
> done when amaya load the schema?

It just loads the .PRS file and store it in core memory.
The internal representation is described in file typeprs.h
But I am not sure you need to go into those details. Use
the Thot API.

> 3. If we already load the schema we need to apply them
> to an element (is it right?).

The thot library does it for you. When you have associated
a P schema with a document, the library applies this P schema
to all elements of that document.

> How can amaya find the
> rule for certain element. i.e: elemen mfrac have
> a,b,and c rules?

Again, the Thotlib does it for you. See function TtaGetPRule (16.3.6)

> I hope somebody can answer my question because i need
> it for my final project.
> i'm waiting for your answer as soon as possible. 

Hope it helps.

> thank you very much
> 
> kind regards,
> 
> the fe ping

May I suggest you use the list www-amaya-dev for this kind of message.
List www-amaya is for users, while www-amaya-dev is the appropriate
forum for developers.

Vincent.
-------------------------------------------------------
Vincent Quint                       INRIA Rhône-Alpes
W3C/INRIA                           ZIRST
e-mail: Vincent.Quint@w3.org        655 avenue de l'Europe
Tel.: +33 4 76 61 53 62             Montbonnot
Fax:  +33 4 76 61 52 07             38334 Saint Ismier Cedex
                                    France

Received on Thursday, 5 September 2002 03:09:56 UTC