Ian Bicking wrote:
On Fri, 2003-01-03 at 01:18, Stuart Donaldson wrote:
  
I wanted to follow-up on the PSP parsing bug

    [ 621494 ] PSP parsing bug when space after first <

Where a space after an opening "<" fails, causing an example to fail.

I thought there was some discussion on this, but I can't seem to spot it 
in the archives.

Does anyone remember the resolution?

Doesn't XML require no spaces between the "<" and the token?  If that's 
the case, it would seem the reasonable thing to do would be to fix the 
UserGuide.html example and remove the missing space.
    

I've never written < tag>, though I could kind of imagine doing it.  PSP
isn't XML, nor does it really attempt to be.  Someone (Tavis... others)
said it should just be fixed, but I don't think it really matters --
fixing the docs would be fine so long as it's not totally confusing to
someone when they do use a space.  Or some regex somewhere can be
changed, which is probably all it is.

  
I lean towards fixing the example in the docs.  Some of the code looks like XML, in particular the <psp:method> and <psp:include> commands.  I would argue that if they look that much like XML then they should behave like it too.

In Mozilla at least, a space as well as the % after the < result in an invalid tag which gets displayed directly, making it easier to identify as a problem and debug.

We could make it slightly more friendly and allow for the space, but does that mean we should allow for "< %" as well?    The parser is fairly simple and works on simple tokens, trying to fix it for whitespace would make it more complicated too.

Just out of curiousity, why do we have both the <%...> and <psp:...> syntaxes?  It seems inconsistent to me at first glance.

-Stuart-


Reply via email to