Hi Sebastian,

At 06:30 PM 1/22/2008, Sebastian Rahtz wrote:
>Wendell Piez wrote:
>>TEI should perhaps publish a list of elements with element-only 
>>contents, for use by stylesheet designers. These are the elements 
>>from which it's a good idea to strip whitespace from, since there 
>>it's simply cosmetic.
>gosh, in the last 7 years of writing TEI XSL, it  has never occurred to me
>to do this! I feel like a klutz. I suppose generating that list will 
>be rather easy.
>you reckon its _always_ safe to say <strip-space elements="choice">? I
>should add that to my common library file, I suppose.

Well, the minute someone allows mixed content inside 'choice' in 
their customization, it isn't. :-)

As Lou could perhaps explain (being very familiar with the vagaries 
of "pernicious mixed content" from the old days), this rule (and the 
obscurity of it) is a consequence of the removal of the dependency of 
XML documents on schemas for their processing. In schema-aware 
processing (as in SGML or with the new XSLT 2.0 option), the 
processor can know which elements have element-only content, and 
within which, therefore, whitespace can have no semantics as 
"content", and can be happily cast away. But since XSLT 1.0 has no 
notion of the schema, the developer has to provide this information 
in some other form.

Hence xsl:strip-space.


Wendell Piez                            mailto:[log in to unmask]
Mulberry Technologies, Inc.      
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
   Mulberry Technologies: A Consultancy Specializing in SGML and XML