Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] document() function and error-handling

From: Wendell Piez <wapiez@---------------->
To:
Date: 1/4/2008 9:21:00 PM
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
======================================================================


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent