fenfire-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fenfire-dev] PEG: RefString DTD


From: Tuomas Lukka
Subject: [Fenfire-dev] PEG: RefString DTD
Date: Tue, 23 Sep 2003 13:29:18 +0300
User-agent: Mutt/1.5.4i

=============================================================
PEG refstring_dtd--tjl: A DTD for refstrings
=============================================================

:Author:   Tuomas J. Lukka
:Last-Modified: $Date: 2002/11/14 15:40:07 $
:Revision: $Revision: 1.5 $
:Status:   Current
:Affects-PEGs: alph_lite--tjl

With Alph lite, we need to stabilize at least that data format.
There are several problems with the current XML format:

- for RICC (URN5) text spans and fake text spans, the actual
  text is not written into the XML inside them. This would be
  useful 

Issues
======

- Should we have a toplevel element? What about elements for fake
  spans?
    
    RESOLVED: We should have a toplevel element to *avoid* having
    elements for fake spans. Using elements for fake spans is pointless
    as they are best modeled by plain strings: consider::

        <faketextspan>ab</faketextspan><faketextspan>cd</faketextspan>
        <faketextspan>abcd</faketextspan>

    In *all* semantics, these two lines should be equivalent.

- What should be the public identifier of this DTD?

    RESOLVED: The best reference to public identifiers 
    I've found on the web is http://docbook.kldp.net/stuff/tdg/ch02s03.html

    According to those rules, we should probably use
    ``+//IDN fenfire.org//DTD RefString v1.0//EN


The RefString XML DTD
=====================

Define a RefString DTD as follows::

    <!-- [alph LGPL license] -->

    <!-- A DTD for the RefString XML representation.

         Public ID: 
           
           +//IDN fenfire.org/DTD RefString v1.0//EN
    
      -->

    <!-- A single referential string, to be parsed (in Java)
         into a single RefString object

         This element may contain text (interpreted as fake spans)
         and "r" elements, which are RICC text spans.
      -->
    <!ELEMENT refstring (#PCDATA|r)*>

    <!-- A single RICC text span.
         The contents is the text of the span, directly.
      -->
    <!ELEMENT r (#CDATA)>

        <!-- The "random" Id of the span, as a string.  To find transclusions,
             these strings are compared exactly character by character.

             One interesting point: an XML file may be compacted by replacing
             all i attributes with entities pointing to the real strings.
          -->
        <!ATTLIST r i CDATA #REQUIRED>

        <!-- The numeric offset of this span inside the "virtual scrollblock".
          -->
        <!ATTLIST r o CDATA #REQUIRED>

Publish the DTD and a start a short document of how it is used.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]