[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Architectural Forms, separation of formatting and loose-leaf managem

  • From: "Rick Jelliffe" <ricko@a...>
  • To: <xml-dev@i...>
  • Date: Thu, 7 May 1998 00:53:31 +1000

loose leaf xml
Here are three random things which may be useful to consider.
 
1) The first is that DSSSL allows you to have external functions. So even though DSSSL itself has no way to query the pagination system, DSSSL does allow you to stick in your own queries or functions. You can do all sorts of tricks with these. I dont know to what extent JADE supports this, though. One trouble with stream-based SGML processors is that they often have an output buffer (or are in a pipe) so unless you can flush the output buffers, your SGML processor may be left stranded if it waits for some feedback from a downstream program.
 
A DSSSL system built on top of a general purpose Scheme would be most likely to cope with feedback from layout engines.  Tony Graham of the DSSSL list would be a good contact in this regard.
 
2) People often put pagination information in processing instructions.  Or the information can be kept in an external database with, for example, HyTime locators. If you can decide in advance to only break pages on paragraph boundaries, then you can piggyback the pagination information on top of element markup.
 
3) If you find you have many of these concurrent structures, you may opt for "point markup", which is rather extreme, and would be an interesting challenge for some stream-based processors. In point markup, your main text is just marked up using 
<!DOCTYPE document [
    <!ELEMENT text ( #PCDATA | point)*>
    <!ELEMENT point EMPTY>
    <!ATTLIST point  id ID #REQUIRED >
 
Then you have as separate element trees for each kind of structure: these trees probably contain no character data of their own, just IDREFs to the start and end of their range.  In this way you can represent concurrent, overlapping hierarchies in SGML. For example:
 
    <!ELEMENT document (tree+, text)>
    <!ELEMENT tree     (start, tree*, end)>
    <!ELEMENT ( start | end ) EMPTY >
    <!ATTLIST    tree            type NMTOKEN #IMPLIED >
    <!ATTLIST (start | end )   refid IDREF #REQUIRED >
]>
    <document>
        <tree name="pages">
            <start refid="x1"/>       
                <tree name="page1">
                        <start refid="x1"/>
                        <end refid="x4"/>
                </tree>
                <tree name="page2">
                        <start refid="x4"/>
                        <end refid="x5"/>
                </tree>
            <end refid="x5"/>
        </tree>
        <tree name="p">
            <start refid="x2"/>
                <tree name="b">
                        <start refid="x3"/>
                        <end refid="x5"/>
                </tree>
                <end refid="x5"/>
        </tree>
        <text><point id="x1"/>here is <point id="x2"/>some<point id="x3"/>
                data <point id="x4">of no interest.<point id="x5"/></text>
    </document>
 
This structure has the advantage of neatness, and provides a lot of modeling power
for just one extra level of indirection. If you used HREF rather than REFID, you can use
external point markup too.
 
The effect, of course, is to have concurrently
    <pages><page1>here is some
                data </page1><page2>of no interest.</page2></pages>
and
    <p>here is <b>some</b>
                data of no interest.</p>
 
 
Rick Jelliffe
 
Author, "The XML & SGML Cookbook", out in May from Prentice Hall.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.