RE: Issue 4 Proposed Resolution (was: why no doc type declaration and PIs in SOAP)

It is certainly easy to skip over a PI without processing it.  The
syntax is quite simple:

PI ::=  '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>' 
PITarget ::=  Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

Regarding skipping a DTD, while that is also possible though a bit more
complicated, a more serious difficulty is that a DTD may declare
entities. Skipping the DTD could lead to having an unreadable document.
Additionally, the integration of DTDs and namespaces is problematic.

-----Original Message-----
From: Marc Hadley [mailto:marc.hadley@sun.com] 
Sent: Monday, October 01, 2001 6:52 AM
To: Bob Hutchison
Cc: Jacek Kopecky; xml dist
Subject: Re: Issue 4 Proposed Resolution (was: why no doc type
declaration and PIs in SOAP)


Bob Hutchison wrote:
> 
> [Marc, I think I sent this only to you not the whole list as I 
> intended.]
> 
For the record my original reply is reposted below.

> So we are talking about accommodating very simple XML processor here. 
> One that cannot recognise a DTD or a PI, yet that is smart enough to 
> know how to skip over them. Does such a parser exist?
> 
> Just wondering.
> 
Some early XML parsers were written in a few lines of Perl using regular

expressions. You can probably still find such things on CPAN I would
expect.

The kind of thing I think the people who pushed back on mandating faults

had in mind would be a mobile device with XML parser crammed into as few

bytes as possible. It's certainly possible to be smart enough to 
recognise and skip over something but not smart enough to understand 
it's contents.

Regards,
Marc.


-- 
Marc Hadley <marc.hadley@sun.com>
XML Technology Centre, Sun Microsystems.

Received on Monday, 1 October 2001 15:22:01 UTC