Actually, what I asked was how to skip over a PI or DTD without knowing what
it was you were skipping over. In your example you know it is a PI. If you
know it is a PI then why can't you fail immediately with the proper code? If
you know it's a PI or DTD, why allow anything other than failure? What's
this 'simple' processor that can skip a PI and DTD and not know what it was
that it skipped?
If such a thing doesn't exist, then we can immediately improve the proposal
regarding Issue 4.
Cheers,
Bob
On 01/10/01 3:16 PM, "Andrew Layman" <andrewl@microsoft.com> wrote:
> 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.
>