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

Re: ID/IDREF makes XML generation NP-hard

idref example
From: "Henry S. Thompson" <ht@c...>

> "Bullard, Claude L (Len)" <clbullar@i...> writes:
> > That's neat, Henry, and I don't mean to be mean-spirited, 
> > but is this a "so, but so what?" kind of thing to know? 
> No offence taken, and yes, it's mostly of academic interest.  It does
> potentially feed in to an ongoing discussion (read 'permathread) about
> the pros and cons of layering varying aspects of 'validation'.

Is "ID/IDREF makes XML generation NP-hard" actually the correct conclusion?
Surely it is only fixed (or defaulted?) ID/IDREFs that make XML generation 
NP-hard (and is it really IDs, or just IDREFs?).  Indeed, one might just as easily 
then attribute the ultimate cause to infoset augmentation as much as non-regularity.

Some XSLT-XPath constructs have the same behaviour, as Bob Lyons pointed
out a few months ago for Schematron.  However, it seems possible to figure out 
which constructs contaminate and to quaranteen them. 

> XML generation itself is of more than academic interest -- a good
> authoring tool ought to be able to generate an example of a document
> type or document type fragment, on request.

Surely that depends on the schema itself: how could one generate RDF
on request for example?  And since, for content- rather than data systems,
metadata is often more fixed than data, autogenerated skeletons can
present users with complex heads when they may want to be working
on bodies.  

The contrasting approach would be templates (and forms)
giving typical and starting positions for editing. (Though, of course, the
two are not really in contention: for example an editor that auto-generated
a template then allowed the developer to trim it into a more useable
template. And a system could potentially sample documents, trim an
existing schema, then generate a template/form, then allow a developer
to customize it.)

Rick Jelliffe


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.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.