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

 


Help: OASIS Mailing Lists Help | MarkMail Help

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

Re: DTD's



Hi, Al,

Well, yeah, I was kind of assuming an enclosing tag (May I be so informal?),
or, possibly, as Eric Bohlman suggested, external entities.

Like I intended to say, the document I was talking about is not yet XML,
just has some tags in it that I play with. The application is still at the
vaporware stage. But since I was attempting to offer some perspective to
Sandra Carney's question, I probably should have provided more concrete
syntax.

I don't have time to write a DTD, but I'll stretch out a small
_hypothetical_ (pure fabrication) file, with enclosing tag:

<journal_month year="2005" month ="7">
<project_list>
    <project name="Hikuhara family research" number="FR000067s001">
        Research rumoured relationship to General Rangawa.
    </project>
    <project name="ISCCII Rendering" number="C000001s003">
        Prototype rendering engine for radical/position sequences.
    </project>
    <etc/>
</project_list>
<job number ="C000001s003" start="1-6:43" end="10:17" summary="Parser
Checking">
    <location>On the train.</location>
    Checked parser code from the code I used in the proposal. Removed
radicals from the generator case, to match the revised radical list.
</job>
<travel job_number="FR000067s001" start="1-10:20" end="10:45" route="from
station to Shizuishi village shrine"/>
<job number ="FR000067s001" start="1-10:50" end="14:25" summary="Background
Research">
    Chatted about village history the whole time.
    <contact><surname>Matsutoku</surname><given_name>Shinobu</given_name>
        Priest in charge, near as I can tell.
    </contact>
    <contact><surname>Matsutoku</surname><given_name>Nozomi</given_name>
        Priest's wife.
    </contact>
    <contact><surname></surname><given_name
accuracy="unsure">Jiro</given_name>
        They called him Jiro, and then they called him something else I
didn't catch.
        Possibly a neophyte? Ran errands for Matsutoku while we were
talking.
    </contact>
    <clue>
        Not aware of a Hikuhara family having lived here.
    </clue>
    <clue>
        Hangawa clan had three official branches and several unofficial
branches in this area.
    </clue>
    <clue>
        Jiro mentioned something about a Teigen family being one of the
unofficial branches, but was warned by Mrs. Matsutoku.
    </clue>
    <return possibility="yes" date="after 2005/07/20" time="before 10:00
preferred"/>
</job>
<etc/>
</journal_month>

Assumptions: One file (document) to a month. The project_list node might
actually be a well-formed XML external entity. The clue element is an
attempt to wave my hands at the necessity of carefully designing an
extensible DTD.

As far as inserting new job elements before the trailing journal_month tag,
it doesn't seem too difficult to me. This is not the sort of log file where
one needs to deal with simultaneous access or multiple entries each second.
Since I'm limiting it to one month per file, I should be able to work
entirely in memory without any notcieable burden on VM.

Joel Rees

============================XML as Best Solution===
Joel Rees                          リース ジョエル
Media Fusion Co.,Ltd.  株式会社メディアフュージョン
Amagasaki  TEL 81-6-6415-2560    FAX 81-6-6415-2556
    Tokyo TEL 81-3-3516-2566   FAX 81-3-3516-2567
                       http://www.mediafusion.co.jp
---------------------------------------------------
                                         Programmer
===================================================

Iwaku Al Snell <alaric@alaric-snell.com>


> On Fri, 18 May 2001, Joel Rees (pop) wrote:
>
> > When I take this to the next step (My boss says I must, but he isn't
> > allocating me time yet.), I will use a RAD tool (Delphi, probably) to
set up
> > a quick form that wraps the fields I know I'll need with XML tags and
> > appends it to a text file that will be well-formed when it is generated.
>
> Not doable IIRC... to be well formed, it has to be a single top-level
> element:
>
> <timesheet>
>  <item>...</item>
>  <item>...</item>
> </timesheet>
>
> New items need to be inserted before the </timesheet>. YOu will either
> need to process the document through a SAX filter that inserts a new
> element at the appropriate moment, or write code that seeks to the end of
> the file, finds the </timesheet>, writes the new element from that point,
> then puts a new </timesheet> on the end...
>
> XML isn't great for appending to, I don't think it's useful at all for a
> log file (except if the log file is composed of a series of little XML
> documents with a higher-level boundary marking between each).
>
> ABS
>
> --
>                                Alaric B. Snell
>  http://www.alaric-snell.com/  http://RFC.net/  http://www.warhead.org.uk/
>    Any sufficiently advanced technology can be emulated in software
>