[osis-core] level attrib added to <q>
Troy A. Griffitts
Thu, 07 Nov 2002 18:29:27 -0700
Agree with Todd's message that it has it's goods and bads.
Agree with you about milestones. Actually, I'm probably going to do all
my quotes as milestones, and your point is exactly correct.
Concerning 'walking the stack up' as opposed to top-down:
I'm probably going to handle requests from a user something like:
Please display John 1:1
I will execute an XPath statement that looks something like:
that should return to me the container for John 1:1. If I have a qoute
in John 1:1 (which I don't, but you get the idea), I won't have to
getParent() to root to see if I have any other quotes as my parent to
know whether to display a ' " ` or whatever, I can merely render all <q
level="1"> in my document at ", level="2" as ', etc.
Does this make sense?
Patrick Durusau wrote:
> Not sure what the level attribute buys you? Err, walk the stack? Parsing
> is from top down, at least for properly nested quotes.
> Would have a better argument with milestones marking quotes, since there
> is no tree to walk down. But you would need to use Start and End
> milestones to carry the attribute and its value.
> Can you say some more about this?
> Troy A. Griffitts wrote:
>> <q> should contain an optional 'level' attribute to allow designation
>> of the depth of the quote, e.g.
>> John said, <q level="1">The people say, <q level="2">Where is our
>> God?</q>. But I say: open your eyes!</q>
>> All quotes at certain level can be rendered with the same ", ', `, or
>> what-have-you, characters.
>> (I realize this can possibly be derived, but this is so common, that
>> it is much easier to tag quotes inside quotes with level="2", than to
>> walk the parent stack for each quote to see if it is a subquote.)