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: Re: [docbook] xml:space or not


hi bob,

i agree that unintended white space would represented. but i want to avoid 
unintended whitespace. i.e. a tool with indentation function does produce bad 
renderign results. my example, to be correct: the slightly changed example 
does not work with xsl-fo either:

this line:
<para><emphasis>em1 </emphasis><emphasis>em2</emphasis></para>

indentation with spy, oxygen (or xslt indent="yes") results in:
<para>
  <emphasis>em1 </emphasis>
  <emphasis>em2</emphasis>
</para>

this produces with antenna house:
em1  em2
     ^^
    two spaces.

in theory the xml:space attribute should fix the problem. in practise oxygen 
ignores the attribute. but anyway, in theory i could avoid the situation 
above. 

all the best,
gregor



On Monday 28 September 2009 18:42:29 Bob Stayton wrote:
> Hi Gregor,
> I'm not sure it is appropriate to add xml:space="preserve" to all mixed
> content elements. That attribute tells applications to preserve *all* white
> space.  Wouldn't that have the unintended consequence of preserving indents
> and line breaks within a para in its formatted output? 

> The default
> behavior in XSL-FO is to collapse multiple white space characters into a
> single space, giving paragraphs the nice formatted flow.  If a stylesheet
> encounters an element with xml:space="preserve", that should override the
> default behavior if the processor were behaving correctly, no?
>
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
>
>
> ----- Original Message -----
> From: "gregor FELLENZ" <gf_public@netzfrei.org>
> To: <docbook@lists.oasis-open.org>
> Sent: Wednesday, September 23, 2009 6:17 AM
> Subject: [docbook] xml:space or not
>
> > hi list,
> >
> > this is an more philosophical thought/question. i'm tested some docbook
> > documents and playing with some custom xslts.
> >
> > problem is indentation and strip-space.
> >
> > with my xslt i need to strip all white space between non mixed content
> > elements.
> >
> > problem with the following snippet:
> > <para><emphasis>em1</emphasis> <emphasis>em2</emphasis></para>
> >
> > with <xsl:strip-space elements="*"/> this is transformed to:
> > <para><emphasis>em1</emphasis><emphasis>em2</emphasis></para>
> >
> > which is obviously not what i want. with:
> > <para><emphasis>em1</emphasis> x <emphasis>em2</emphasis></para>
> >
> > everything works fine, whitespace is preserved.
> >
> > i know how to get around the limitation with:
> > <xsl:preserve-space elements="para"/>
> >
> > in this case i have to add any mixed content element to the list, i.e.
> > reading the whole dtd checking/adding every element.
> >
> > wouldnt it be better to add an fixed attribute to any mixed content
> > element like:
> > xml:space CDATA #FIXED "preserve"
> >
> > this would help not only with xslt transformation also with pretty print
> > functions (assumed the dtd is interpreted). and would make clear how to
> > handle the current element.
> >
> > i'm not assuming that this is added in near future, i would be more
> > interested if this idea was discussed. and/or if this method causes any
> > problems with custom dtds.
> >
> > hope this question is fitting into the list topic!
> >
> > all the best,
> > gregor
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> > For additional commands, e-mail: docbook-help@lists.oasis-open.org

-- 
reclaim your net - http://tor.eff.org
enforce privacy - http://www.gnupg.org
pgp key id: 5E7CC4DF 

Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.

Vorratsdatenfrei erreichbar unter:
https://www.awxcnx.de/grefel.msg


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