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

RE: document() function and error-handling

Subject: RE: document() function and error-handling
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 04 Jan 2008 16:18:55 -0500
RE:  document() function and error-handling
Scott,

At 01:30 PM 1/4/2008, you wrote:
Would there be any reason *not* to include an <?xml-result?> PI in the
result document? As I understand it, this sort of thing is what PIs were
designed for.

Yes, it is. PIs are for application-specific information, which is for your application, a signal, but for anyone else's, noise.


(And is it an XML faux pas to start the PI with "xml-"?)

Yes it is, and not just a faux pas but formally illegal. XML does reserve the characters "[X|x][M|m][L|l]" in names, for use by W3C. And the definition of PI targets does say:


The PI begins with a target (<http://www.w3.org/TR/REC-xml/#NT-PITarget>PITarget) used to identify the application to which the instruction is directed. The target names "XML", "xml", and so on are reserved for standardization in this or future versions of this specification.

This doesn't actually exclude names that only start with "xml", but on the other hand, a PITarget is defined as a name, which does. (And in any case, you'd be abusing the spirit if not the letter to use it, etc.) Parsers, it is true, sometimes fail to enforce this restriction on names.


In SGML, it was considered good manners actually for the PI target to identify the application at which it is aimed (hence the name "target"), and even for a NOTATION declaration to be used to enable a system to determine something about that application and perhaps resolve it dynamically. But no one does that any more.

Nevertheless, it would seem like good design in principle to name your PI target in such a way that other applications that might eventually see your data (and the whole idea of XML is that you never say never about that) can have some assurance that the PI is really noise for them, not signal.

Just wondering if extraneous PIs in transformation source/result
documents are considered good coding convention or not. It'd be nice to
actually make use of them from time to time.

That's what they're there for. Just don't go overboard and start to code actual document semantics in them (as opposed to application semantics).


Note: this has stopped being an XSLT issue! :-)

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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-2007 All Rights Reserved.