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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] Output order of elements contained in <personname>


Hi Bob,

Thanks so much for the analysis.  (See inline below.)

On Wed, 28 Oct 2015 09:52:26 -0700
Bob Stayton <bobs@sagehill.net> wrote:

>  > Why isn't this the default?  What is gained
>  > by altering document order?
> 
> The author of the personname template logically assumed that
> <firstname> comes first in presentation unless otherwise specified.
> That 'otherwise' is provided by an optional role attribute on
> personname, as described here:
> 
> http://www.sagehill.net/docbookxsl/PersonNames.html
> 
> which supports altered output such as "Stayton, Bob".
> 
> The stylesheet has to supply some formatting, because the whitespace 
> between elements inside personname is not considered significant in
> the schema. This custom template:
> 
> <xsl:template match="d:personname">
>     <xsl:apply-templates/>
> </xsl:template>
> 
> just happens to preserve any whitespace between elements, but if you 
> omit the space between elements in your source file, then they run 
> together in the output, which is not the expected result.
> 
> To carry this idea a little further, perhaps personname should work
> more like bibliomixed, which allows a mix of text and elements whose
> order is preserved, as opposed to biblioentry where the order of
> elements is imposed by the stylesheet based on some bibliography
> style.  But currently personname does not permit text other than
> whitespace between elements, so you could not insert a comma between
> surname and firstname in your document, for example.

This suggestion seems most sensible, and the best way
to allow useful markup of names like "King Leopold Filips 
Karel Albert Meinrad Hubertus Maria Miguel III of Belgium".
Some of the components of this sort of name could be enclosed
in markup, others written as text.

> You are suggesting that the default processing should be to preserve
> the order of elements in personname and to insert spaces between
> them.  We can still use @role to support other output formats.

The role attribute just isn't all that useful, IMO.  At least
not on personname.  To retreat from the exotic, an honorific
like Mr. comes first, where PhD. comes last.  (At present
I've found it easiest to give up when using DocBook 5
and put text in the personname element without further
markup.)

Further,
role is the one generic attribute that provides a handy "hook"
into non-DocBook applications.  It's nice to have it
on-hand for that purpose.  It might be nice instead to
introduce a processing instruction and free up role.
This could be done in a backwards compatible way by
giving the processing instruction "priority".

After reading your comment above I now prefer the "bibliomixed
approach".  If whitespace is desired between markup then
it should be included in the source document.

> Making this change would introduce problems for people who have
> relied on the stylesheet to impose their expected order, regardless
> of the order of the elements in personname, which heretofore has not
> been considered significant.  To preserve backwards compatibility, we
> could introduce a stylesheet parameter that would designate the
> behavior.  In this case, I would suggest that the default setting be
> to preserve the old behavior, and allow a new setting to support the
> new processing expectations.  That's generally how we support both
> old and new features without introducing surprises during upgrades.

Yes.  FWIW, I don't see problems in introducing incompatibilities
with major releases.  It would be nice to have document
order-dependency be the default.  It makes more sense when
doing things like getting all the honorifics of a personname
and sticking them together.

Regards,


Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein


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