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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Consistent handling of all purely presentational characters such a quotes, parenthesis, square brackets, slashes


In our content we often come across characters that are not part of
the data itself, they just serve as delimiters, punctuation and visual
cues to separate the data.
I'd rather not hardcode such characters, but instead wrap them inside
a docbook element so that for different outputs we can choose
different styling.
Consider this example:
1 cm ( 2.5 in )

We have several issues here:
1. Imperial vs metric - for this I'm fairly certain we should use
condition attribute and let's try not to discuss this part.
2. Whitespace - if I simply captured '(' as a character there's no
telling how how much surrounding whitespace should I strip
3. handling of units - currently I capture the cm using a dedicated
phrase element with a role unit, in case this needs to be stripped out
or render as full 'centimeters' for example. The only downside is I
end up with mixed content if I don't strip the unit. Again Let's try
not to focus on this.

The issue that I do want to discuss is how to capture parenthesis in
this example.
Docbook, for example has a dedicated quote element but that's hardly
exhaustive as sometimes it is indeed a quote, but sometimes it's
parenthesis surrounding the element sometimes a slash separating them
sometimes there isn't anything other than whitespace but the data
should be separated.

My current thinking leads me to overloading phrase element yet again
and doing something like:

<phrase rend="surround_with_parenthesis">2.5<phrase
role="unit">in</phrase></phrase> (or http://pastie.org/3165754 )

Any better ideas, ideally ones that perhaps take advantage of
Docbook-OT capabilities perhaps?

Lech


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]