[sword-devel] Food for thought regarding OSIS and some of its
alternatives...
DM Smith
dmsmith555 at yahoo.com
Tue Feb 7 05:46:43 MST 2006
Much deleted.
Troy A. Griffitts wrote:
> How, in legal XML, do you markup multiple overlapping hierarchies like:
>
> paragraph markers
>
....
>
> We struggled with this and came up with what you suggest in you paper:
> milestones. And I think we've tried our best to make the milestoning
> syntax straightforward:
>
....
> <verse sID="uniqueID" osisID="Jn.1.1" />
> In the beginning...
> <verse eID="uniqueID" />
>
> I agree that you lose much of the advantage of XML processing tools
> that depend on a DOM tree hierarchy.
To me, milestones present the biggest challenge in working with OSIS as
we use XSLT to transform it to HTML for presentation.
Specifically, the difficult, and I hope not intractable, problem I am
working on right now is how to render "red letter text" when milestones
are used to indicate the beginning and ending of the Jesus' speech.
These parent elements may be siblings, but they could just as well be
distant cousins (third cousin fourth removed). Turning on red at one
arbitrary point in a document and turning it off at another arbitrary
point in the document is difficult to mark up in valid html.
Doing it in xslt is harder because it involves remembering state and
since xslt does not have true variables it is hard to remember state. I
am still looking for suggestions on what works. I'm thinking of
"shelling" out to java to have it remember state externally.
>
>
> I don't use XSLT, so I don't really care :)
Them's fighting words ;)
I have tried DOM (too expensive in time and space for a large document),
and SAX (very inexpensive in time and space, but too tedious,
inflexible, cumbersome, complex and error prone) to do xml
transformations. Many years ago, I even wrote a rule based system
(easily replaced with xslt). And of course, hand written parsers (very
inflexible and did not handle the full schema).
I have not used the xml pull parsers, which look promising.
With all of these, except perhaps the hand written parser, the input
requirement is that the xml be well-formed and can be made to require
valid xml.
I was sold on xslt when we had to create different outputs for the same
input and respond to changing requirements in a deployment adverse
environment.
It is not the be all and end all of xml manipulation. But it is the
first thing I try when faced with an xml transformation.
More information about the sword-devel
mailing list