Re: FO DTD from XSL WD.

Subject: Re: FO DTD from XSL WD.
From: "James Tauber" <jtauber@xxxxxxxxxxx>
Date: Fri, 6 Aug 1999 10:42:43 +0800
> >FOP treats it that way. Another way would be to only allow inheritable
> >attributes on elements whose allowable decendants can use that attribute.
>
> Unfortunately, I'm trying to understand what is the way
> proposed by WD. FOP's behavior may be right, but
> behavior of another rendering engine may be
> "another way" - as a result  if somebody is rendering
> some FO with FOP - it may result in producing invalid
> FO's  ( that would be considered invalid ) by another
> software.

But the rendered result will be the same, the only difference is error
handling.

Consider two different XSL formatters:

A. Inheritable Attributes can go anywhere
B. Inheritable Attributes can only go on elements whose allowable decendants
can use that attribute

These two formatters will produce the same formatting, the only difference
is that B will report errors that A will not.

FOP is of the type A because it doesn't support all properties yet and
people wanted to be able to give it formatting object trees with properties
it didn't know about.

> I hope the purpose of WD (or any other stantard)
> is to *avoid* such problems. Isn't it?

I agree that the behaviour upon getting an attribute that will be ignored
should be defined in the WD.

> >But you are supposing that there is value in a notion of validity that
> >is contraining enough to rule out attributes that won't be used. I don't
> >necessarily disagree with you, but it is worth noting that it is a design
> >decision whenever developing schemata (and I always include DTDs when I
say
> >'schemata') which constraints are in the schema and which you check at
the
> >application level.

> I understand this point, but unfortunately I don't see too much relation.

My point is that the behaviour upon getting an attribute that will be
ignored doesn't necessarily have to be represented in the schema. There are
lots of things that the schema doesn't tell you that you need to look at the
prose for. The fact that font-size can go on inline-sequence is one of them.
The fact that "giraffe" isn't a legal font-size is also one of them.

> Yes, one should use CDATA
> for any attribute. It's OK. The WD provides
> all the materials you need to validate the
> value of font-size. It seems that  WD provides you
> with no information about what is the relation
> between elements and their attributes and this is
> *very* strange.

It talks a lot about the relationship between properties and formatting
objects, which are the real objects of interest in XSL. The fact that they
are serialised as XML is somewhat secondary. Remember that formatting object
trees don't have to be serialised as XML. XSLT stylesheets just use
element/attribute syntax to represent the formatting objects and properties
that an XSL processor is supposed to construct.

[...]
> Unfortunately in this case we have a situation when constrains
> are not expressed *at all*, not only in the DTD.

True. But, as I see it, they are constraints that only affect error
reporting, not the actual formatting.

James
--
James Tauber / jtauber@xxxxxxxxxxx / www.jtauber.com
Maintainer of : www.xmlinfo.com,  www.xmlsoftware.com and www.schema.net
<pipe>Ceci n'est pas une pipe</pipe>


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


Current Thread