OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Processing instruction guidelines

[ Lists Home | Date Index | Thread Index ]

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@CraneSoftwrights.com
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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS