[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: FO samples at www.renderx.com

Subject: Re: FO samples at www.renderx.com
From: "Paul Tchistopolskii" <paul@xxxxxxx>
Date: Wed, 29 Sep 1999 13:58:34 -0700
dtd pcdata

>> I've found a couple of errors, however (at least, they are errors
>> according to the DTD in the April XSL working draft):
>> 1) In both borders.fo and padding.fo, you have empty
>> fo:inline-sequence elements. The DTD says that an fo:inline-sequence
>> must contain at least one child.

You have come across a delicate point. Let's consider it more closely.
The WD DTD says:

WD DTD>  <!ELEMENT fo:inline-sequence (
WD DTD>      #PCDATA
WD DTD>    | %inlines;
WD DTD>    | %block-level;
WD DTD>    )+
WD DTD>  >

Now, look at the following excerpt from XML TR:

XML TR> 3.2.2 Mixed Content
XML TR> An element type has mixed content when elements
XML TR> of that type may contain character data, optionally
XML TR> interspersed with child elements. In this case, the types
XML TR> of the child elements may be constrained, but not their
XML TR> order or their number of occurrences:
XML TR> [51]  Mixed ::=  '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*'
XML TR>                | '(' S? '#PCDATA' S? ')'

Please note that any element that may have #PCDATA children may
also get no children at all: THIS IS AN XML LAW.

The WD DTD expression is simply ungrammatical, and IBM XML4J parser
(that we use for validation) simply cannot swallow it in its original
form. We couldn't help modifying it, and our DTD looks like this:

RenderX DTD>  <!ELEMENT fo:inline-sequence (
RenderX DTD>      #PCDATA
RenderX DTD>    | %inlines;
RenderX DTD>    | %block-level;
RenderX DTD>    )*
RenderX DTD>  >

I hope this explains why empty inline-sequences are accepted
by our validator.

Another point is whether this is semantically correct. We presume
the following treatment of these cases: ?n empty inline-sequence
has no escapement-progression-direction (=horizontal) size, but
does have a line-height. That's why placing such a construct into
a fo:block will prevent the latter from collapsing. In the testcases
you have cited, we have used this technique to separate consequent
framed blocks.

(I confess that this was done just for convenience of writing tests.
We had a style for underlined headers - say, h2 - and have noticed
that an empty <h2/> does prevent frames from collapsing. And then,
we kinda abused it ;-).

Sure, this is not very accurate; now that you have pointed this out,
we have corrected the tescases using margin-bottom instead.
However, in my opinion, empty inline-sequences do not seem too much
of an error.

>> 2) In columns.fo, the fo:region-body in some of the page masters comes
>> _after_ the fo:region-XXX's. The DTD says that they must be specified
>> in this order:
>>
>>  fo:region-body
>>  fo:region-before
>>  fo:region-after
>>  fo:region-start
>>  fo:region-end


Oh, this is a real error. The test didn't pass our own validation.
Sorry for the fact, and thank you for help. The test has been fixed.
It the buggie version has  been publiched there very long time 
ago, unfortunately I forgot to update this particular testcase...

Thanks indeed for looking into the tests; we are pleased to see
people using them.


Rgds.Paul.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 paul@xxxxxxxxx   www.renderx.com   www.pault.com
 XMLTube * Perl/JavaConnector * PerlApplicationServer
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.