David Sewell | 1 May 2006 05:05
Favicon

Adding html:table to tei:table in P5

I've just been attempting to create an ODD file that will produce a P5 
schema that will allow html:table (i.e., 'table' in the XHTML namespace)
anywhere that a TEI-namespace table is permitted. But I'm not quite clear 
on how to add an element from another namespace. I tried something along
the lines of

   <elementSpec module="figures" ident="html:table" mode="add">

(having defined the 'html' prefix and included a RelaxNG version of
the XHTML schema), but Roma doesn't seem to like prefixed element names.
What am I missing here?

--

-- 
David Sewell, Editorial and Technical Manager
Electronic Imprint, The University of Virginia Press
PO Box 400318, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: dsewell <at> virginia.edu   Tel: +1 434 924 9973

Sebastian Rahtz | 1 May 2006 12:33
Picon
Picon
Favicon

Re: Adding html:table to tei:table in P5

David Sewell wrote:
> I've just been attempting to create an ODD file that will produce a P5
> schema that will allow html:table (i.e., 'table' in the XHTML namespace)
> anywhere that a TEI-namespace table is permitted. But I'm not quite
> clear on how to add an element from another namespace. I tried something
> along
> the lines of
> 
>   <elementSpec module="figures" ident="html:table" mode="add">
> 
> (having defined the 'html' prefix and included a RelaxNG version of
> the XHTML schema), but Roma doesn't seem to like prefixed element names.
> What am I missing here?

I am afraid its not as simple as it might be. What you have to do is
locate a Relax NG grammar for XHTML (let's call it xhtml.rng) and then
massage TEI patterns by hand. Thus:

      <moduleRef url="http://www.whatever.org/xhtml.rng">
      	<content>
	  <rng:define name="model.inter" combine="choice">
	    <rng:ref name="html.table"/>
	  </rng:define>
	</content>
      </moduleRef>

so
 a) <moduleRef>'s  <at> url loads an external file of Relax NG code
 b) <moduleRef> has an optional <content> child whose contents are
    injected into the final schema.
(Continue reading)

Sebastian Rahtz | 1 May 2006 12:54
Picon
Picon
Favicon

Re: Adding html:table to tei:table in P5

PS (1): it is possible to generate the TEI schemas with a prefix on
every pattern name, to let you bypass conflicts on names.
use
  roma --patternPrefix=tei_  etc etc etc
(you cant do this with Web Roma)

PS (2): the ISO DSDL model will let you validate different namespaces
separately using NVDL. Unfortunately, that seems to be a fairly
slow-moving beast, and I don't see meaningful implementations. Anyone
know of one?

--

-- 
Sebastian Rahtz

Information Manager, Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

OSS Watch: JISC Open Source Advisory Service
http://www.oss-watch.ac.uk

David Sewell | 1 May 2006 18:57
Favicon

Re: Adding html:table to tei:table in P5

Thanks to Sebastian's help, I was able to feed Roma an ODD specification
file that generated a Relax NG schema which permits an XHTML table
(<html:table>) to be used in the same context as a standard TEI table
element.  I needed to hand-tweak a couple of things; details follow for
anyone else who want to try this.

First, I used the online Roma to generate a simple ODD template file
containing the default modules plus "figures". I edited this file by
hand to add an additional <moduleRef> element to the <schemaSpec> element:

    <moduleRef url="http://www.thaiopensource.com/relaxng/xhtml/xhtml.rng">
      <content>
	<rng:define name="tei_model.inter" combine="choice">
	  <rng:ref name="table"/>
	</rng:define>
	<rng:define name="tei_model.common" combine="choice">
	  <rng:ref name="table"/>
	</rng:define>
      </content>
    </moduleRef>

where the URL in the first line points to James Clark's modularized
RelaxNG schema for XHTML.  Then, using a command-line version of Roma,
I ran

   roma --patternprefix=tei_ --nodtd --noxsd myTei.odd Schema/

This generated a well-formed RelaxNG schema called MyTei.rng, with
"tei_" prefixed to all the TEI definitions as promised.

(Continue reading)

Ginny Wagner | 1 May 2006 23:18
Picon

Secondary Sources

I'm busily marking up secondary source tome (Round's Calendar  of French Charters, Henry II Household Accounts) and want to know if anyone has  

1. already done what I'm attempting 

2. developed a schema or DTD to which I can conform

Learning XML has a nice sample FO markup which handles footnotes and presentation as to paging, etc., which I can adapt.  However, as long as I'm doing the markup, it seems silly to not check and see if there is already a template with which I could be consistent.
 
Thanks in advance.
Ginny Wagner
Sebastian Rahtz | 2 May 2006 11:25
Picon
Picon
Favicon

Re: Adding html:table to tei:table in P5

David Sewell wrote:
> I was able to feed Roma an ODD specification
> file that generated a Relax NG schema which permits an XHTML table
> (<html:table>) to be used in the same context as a standard TEI table
> element. 

excellent!  I am glad it was not as traumatic as I had feared.

> 
>  * the includes from the remote xhtml.rng were given as relative
>    filesystem files, not as HTTP URLs.

I'll look at this. Puzzling.

>  * myTei.rng still wouldn't validate, throwing the error "Multiple definitions of
>    start without 'combine' attribute". Diagnosis: the modules included via
>    the <moduleRef> element themselves contained an <rng:start> element. Fix:
>    add "combine='choice'" by hand to the <rng:start> element generated by Roma.

this is always a pain when pulling in external schemas. it drives me crazy

>    (Again, should Roma be smart enough to do this? Or should my ODD file
>    have redefined <rng:start>?)

its an attribute on <schemaSpec>, eg <schemaSpec start="TEI body div">;
but that would not have helped.

I'll have a think about this.

--

-- 
Sebastian Rahtz

Information Manager, Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

OSS Watch: JISC Open Source Advisory Service
http://www.oss-watch.ac.uk

Arianna Ciula | 2 May 2006 12:56
Picon
Favicon

Re: Secondary Sources

Dear Ginny,

 

I am involved in a project on the digital edition of the Henry the 3rd Fine Rolls (see project website at http://www.frh3.org.uk). We are producing an English calendar of the Fine Rolls.

 

Even if what we are dealing with are primary sources, our TEI template is actually reproducing the structure of a secondary source (edition of calendar entries) with the markup of all we thought was relevant for producing a normal calendar display together with rich indices and for facilitating any further research on the rolls.

 

The calendar won’t be partially public until later this year. However, I could give you more information out of list if needed. It would certainly be good to collaborate and exchange views on this material.

 

Kind regards,

 

Arianna Ciula

 

From: TEI (Text Encoding Initiative) public discussion list [mailto:TEI-L <at> listserv.brown.edu] On Behalf Of Ginny Wagner
Sent: 01 May 2006 21:18
To: TEI-L <at> listserv.brown.edu
Subject: Secondary Sources

 

I'm busily marking up secondary source tomes  (Round's Calendar  of French Charters, Henry II Household Accounts) and want to know if anyone has:   

1. already done what I'm attempting 

2. developed a schema or DTD to which I can conform

Learning XML has a nice sample FO markup which handles footnotes and presentation as to paging, etc., which I can adapt.  However, as long as I'm doing the markup, it seems silly to not check and see if there is already a template with which I could be consistent.

 

Thanks in advance.

Ginny Wagner

Sebastian Rahtz | 2 May 2006 13:35
Picon
Picon
Favicon

Re: Adding html:table to tei:table in P5

David Sewell wrote:
>
>  * the includes from the remote xhtml.rng were given as relative
>    filesystem files, not as HTTP URLs. 

I am changing the system to (recursively) expand includes. Is that
the right thing to do?

--

-- 
Sebastian Rahtz

Information Manager, Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

OSS Watch: JISC Open Source Advisory Service
http://www.oss-watch.ac.uk

Sebastian Rahtz | 2 May 2006 13:46
Picon
Picon
Favicon

Re: Adding html:table to tei:table in P5

David Sewell wrote:
>
>  * myTei.rng still wouldn't validate, throwing the error "Multiple definitions of
>    start without 'combine' attribute". Diagnosis: the modules included via
>    the <moduleRef> element themselves contained an <rng:start> element. Fix:
>    add "combine='choice'" by hand to the <rng:start> element generated by Roma.
>    (Again, should Roma be smart enough to do this? Or should my ODD file
>    have redefined <rng:start>?)
> 

I have changed my stylesheets to ignore any <rng:start> in include
RELAXNG grammars, so this should work properly now.

Revised stylesheets are not public yet, however. A good few changes
waiting to go live, including a lot more work on getting valid XHTML out.
--

-- 
Sebastian Rahtz

Information Manager, Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

OSS Watch: JISC Open Source Advisory Service
http://www.oss-watch.ac.uk

David Sewell | 2 May 2006 15:50
Favicon

Re: Adding html:table to tei:table in P5

On Tue, 2 May 2006, Sebastian Rahtz wrote:

> David Sewell wrote:
> >
> >  * the includes from the remote xhtml.rng were given as relative
> >    filesystem files, not as HTTP URLs.
>
> I am changing the system to (recursively) expand includes. Is that
> the right thing to do?

If Roma is allowed to pull in includes via HTTP at all, then I would say
yes. It might be helpful to have Roma give diagnostic messages whenever
it grabs a file via HTTP, just to alert the user that this is happening.
(There can be nasty surprises if a user doesn't realize that schemas are
being fetched over the network, in cases where they are not accessible,
so a diagnostic would hint that they might want to copy all the files to
a local filesystem for performance reasons.)

DS

--

-- 
David Sewell, Editorial and Technical Manager
Electronic Imprint, The University of Virginia Press
PO Box 400318, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: dsewell <at> virginia.edu   Tel: +1 434 924 9973
Web: http://www.ei.virginia.edu/


Gmane