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: 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


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