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

Re: Preserving inline DTD

Subject: Re: Preserving inline DTD
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxx>
Date: Fri, 31 Jan 2014 12:59:27 -0500
Re:  Preserving inline DTD
Dear Peter,

On Fri, Jan 31, 2014 at 7:28 AM, Peter Flynn <pflynn@xxxxxx> wrote:
>> An XSL-FO processor has no need for a DTD internal subset; indeed in
>> that architecture one would ordinarily consider one to be irregular
>> and superfluous if not worse.
>
> Does this mean that an XPath statement in an XSL:FO script which references
> an attribute for which the internal subset provides a default value cannot
> make use of it? (My ignorance speaking: I have no use cases for FO here so I
> have barely ever used it.)

No it doesn't. Assuming the parser in your configuration handles the
internal subset properly, you could indeed hide an attribute value in
there.

However -- I would argue that such a practice would not be "ordinary".
And I assume you mean by "XSL:FO script" an XSL-FO instance, not an
XSLT that generates XSL-FO.

If you meant the XSLT that constructs an XSL-FO instance by reference
to an arbitrary XML document (perhaps with an internal DTD subset),
that's a different thing, and much closer to ordinary. But there's no
need to write an internal subset here, only read one.

Maybe instead of "XSL-FO processor" here I should have said "XSL
formatter" (i.e. the consumer of the XSL-FO instance, which may or may
not be serialized across the transformation/formatting boundary), to
distinguish it from any XSLT processing that may happen upstream from
it.

More broadly, I can say I've never seen the requirement to "preserve"
or (re)write an internal DTD subset except in the case of
near-identity transformations (like that of the OP). Put more
strongly, my point could have been that although the modified identity
transformation is described in the XSLT 1.0 Recommendation, its use
was specifically *not* a primary use case for XSLT 1.0. So any
processing requirements thereto appertaining also fell to the wayside,
such as the need to maintain "tagging fidelity" with respect to things
like entity references, whitespace in tags, order of attributes,
internal DTD subsets etc.

More than that -- as David C points out, since nothing in most data
models for XML (including XDM) provides for capturing an internal
subset, as such, in an XML parse (as opposed to applying its
declarations and thus "resolving it away"), the requirement to
"preserve" (i.e. copy) an internal subset from source document to
serialized result is one that the tool chain, unextended, simply can't
support.

It's kind of like asking for a sprig of fresh parsley on your plate of
stew. You can have the parsley, but it isn't going to come out of the
stew pot.

Cheers, Wendell

-- 
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^

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.