Re: What's Good XML Document for XSLT or XQL applications

Subject: Re: What's Good XML Document for XSLT or XQL applications
From: "Evan Easton" <evan@xxxxxxxxxxx>
Date: Wed, 1 Dec 1999 12:27:55 -0600
> > More specifically, is it (much?) easier to handle content models like
>
> No. Probably any query for one form can be automatically converted to one
> for the other. There is also a third form (which is probably as common)
>
> <Section>
>   <Title>...</Title>
>   <p>blablabla...</p>
>   <p>blablabla...</p>
> </Section>
>

I'd be inclined to use the following:

<Section>
    <Title>...</Title>
    <Body>
        ...
    </Body>
</Section>

The benefit isn't necessarily in the styling, but instead in the constraint
of the content of a section.  _Presumably_, the non-title contents of a
section are ordered (first come-first shown), and _presumably_ you want your
title to be at the start of the section.  If you don't have the Body tag,
then you are essentially saying to authors that it's OK to put the Title
anywhere in the section, as in:

<Section>
    <P>Some body content</P>
    <Title>The section title</Title>
    <P>Some more body content.</P>
</Section>

This is somewhat at odds with the idea that the section's non-Title content
is ordered.  While the styler can cope with it, it's just not consistent.
So use the Body and ley your DTD enforce ordering.

Disclaimer:
I'm not saying that I think all content should be ordered in the same way
that it's displayed.  I'm as much for separation of content and presentation
as anyone can hope to be.

Evan



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread