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

Re: A little wish for short end tags

  • From: Paul Prescod <papresco@t...>
  • To: xml-dev@i...
  • Date: Sat, 16 May 1998 15:59:32 -0400

download little wish
Jon Bosak wrote:
> 
> A perl regexp is the *upper bound* of sophistication for this
> constituency.  Please try, if you can, to imagine being faced with the
> job of doing an element-specific mass search-and-replace over two
> years' worth of company reports when all you know about XML is what
> you can see by looking at the source, you've never heard of the
> concept of a normalizer, and the only scripting tool you know how to
> use is the Word or WordPerfect macro language.  

I do not believe that a person with the knowledge level you have described
is going to succeed at the task you have set for him or her.

Entities are going to kill them.
Whitespace in end-tags is going to toast them. 
CDATA sections are going to confuse them.
Elements (and tags!) broken across lines are going to destroy them.

This person can only succeed if 
a) the data is already normalized, probably due to a corporate standard
such as the one you mention.
b) they download a normalizer.

If I am wrong, it would be easy to prove me so. All someone has to do is
provide a regular expression that can (for instance) change all
occurrences of the GI "FOO" into "BAR" in any XML document corresponding
to a DTD of their choice (but which I can extend in the internal subset).

On the other hand, I can do this *trivially* in a regular expression on
data that has been normalized.

> SGML gives you the option of using empty end tags, and the
> historical fact is that most large users, given this option and a
> sufficient amount of experience with it, choose not to use it.  

These "large users" have expensive SGML editors that they have paid
someone thousands of dollars to customize to perfection. Under those
conditions, I would legislate redundancy also -- not just fully expanded
end-tags, but probably redundant IDs in comments of end-tags, public
identifiers on all entity declarations, perhaps even unique identifiers on
all elements.

But XML is about a different world than that.

Paul Prescod  - http://itrc.uwaterloo.ca/~papresco

"A writer is also a citizen, a political animal, whether he likes it or 
not. But I do not accept that a writer has a greater obligation 
to society than a musician or a mason or a teacher. Everyone has
a citizen's commitment."  - Wole Soyinka, Africa's first Nobel Laureate

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.