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

Processing instruction guidelines

  • To: xml-dev@l...
  • Subject: Processing instruction guidelines
  • From: Jeni Tennison <jeni@j...>
  • Date: Thu, 23 Jan 2003 16:07:19 +0000
  • Envelope-to: xml-dev@l...
  • Organization: Jeni Tennison Consulting Ltd
  • Reply-to: Jeni Tennison <jeni@j...>

instruction processing
Hi,

I'm trying to put together some guidelines about when we should use
processing instructions and when some other construct (e.g. empty
element, namespaced attribute) to pass information to an application.

The fact that PIs can appear before and after the document element
makes me think that they are good for holding instructions that effect
the processing of the entire document, especially if those
instructions are repeatable (e.g. the xml-stylesheet PI). Otherwise
you have to use one or more structured attributes on the document
element to achieve the same kind of effect (e.g. the
xsi:schemaLocation attribute), which gets mighty ugly real quick.

The fact that most schema languages (Schematron being one exception)
can't constrain/don't care where PIs appear makes me think that PIs
are good for holding information that can go anywhere without
disrupting the main content of the document. For example, XMetaL uses
them to hold deleted content and mark the start and end of inserted
content, which seems very reasonable to me.

Are there any other good uses for PIs? Does anyone have examples of
*inappropriate* uses? I have the impression that some people think
that any use of PIs is inappropriate, but I'm not sure what the
argument is?

Also, are there any guidelines about naming the targets of PIs? The
ones that I've seen tend to use a naming scheme "prefix-localPart"
where the prefix is used to indicate the authority or application
involved and the local part is used to specify the name of the
instruction itself. Is that fairly standard?

Despite the fact that the XML Rec. suggests using notations to specify
the legal names of PIs, I haven't actually seen that in use. Anyone
think that it's good practice?

What about PI data? Most PIs that I've seen use pseudo-attributes, I
guess for extensibility. Is that standard practice?

Thanks in advance for any comments or pointers to material on the
topic.

Cheers,

Jeni
---
Jeni Tennison
http://www.jenitennison.com/


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.