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

Re: Processing instruction guidelines


processing instruction
At 2003-01-31 11:58 -0500, Elliotte Rusty Harold wrote:
>At 8:53 AM -0500 1/24/03, G. Ken Holman wrote:
>
>>My editing environment includes a spell-check facility.  The fact that a 
>>word needs to be ignored because it isn't in the spell-check dictionary 
>>isn't an aspect of the information in my document: I will still format 
>>the document or process the document regardless of whether the word is 
>>spelled correctly or not.  But, during editing time, it *is* important to 
>>escape the word explicitly so that I get a clean spell check.  So I use 
>><?no-spell start?> and <?no-spell end?> around the text that isn't to be 
>>checked ... and the editing environment protects such sequences.
>
>I can see why you do this, and I'm not sure I've got a good alternative. 
>Nonetheless I'm deeply bothered by processing instructions with extension; 
>i.e. beginnings and ends. Such PIs can cross element boundaries.

Granted.  But if I introduced element structure to preserve my spell 
checking within XML structure I would be impacting on the validity of my 
document.  And, adding element structure in my mind adds *information* to 
my XML instance ... information that has nothing to do with the information 
in the rest of the instance.

Yes, I could use a foreign namespace and then strip it out for validation 
purposes, but a PI seems so very benign to me that I can use it *without* 
consideration any negative impact for downstream processing of the 
structured information in my document.

>Also, what happens is you leave off the end-instruction? or forget the 
>start instruction? There are reasons parsers check for tag balancing.

Yes, for the integrity of the information.  I'm willing to live with the 
risk of lack of integrity of my processing application since I'm doing it 
*for* the processing application and not for the information content.

>This side steps that in a way I'm not at all comfortable with.

But I'm not comfortable influencing the information structure with an 
artifact of processing.  The fact that a word is spelled incorrectly to my 
spell checker is an aspect important only to the spell checker and not to 
the integrity of the information in my document or the downstream 
processing of the document.

My choice would of course change if spelling correctness *were* an issue of 
the integrity of my information for downstream processing ... then I would 
model it into the element and attribute structure of my vocabulary.

XSLT is nice in that the default processing for PIs is to throw them away, 
so there really has been zero impact to my publishing environments by my 
throwing in PIs all over the place to accommodate my Canadian spelling of 
"colour", "flavour", "behaviour", etc. without having to add the words to 
my dictionary and end up missing them later on when I deliver another 
document to a U.S. client.

I hope this helps.

........................ Ken

--
Upcoming hands-on in-depth   Europe:         February 17-21, 2003
XSLT/XPath and/or XSL-FO     North America:      June 16-20, 2003

G. Ken Holman                mailto:gkholman@C...
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/x/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 0-13-140374-5                              Definitive XSL-FO
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1              Practical Formatting Using XSL-FO
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/x/bc


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
 

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.