[Home] [By Thread] [By Date] [Recent Entries]
On Thu, 20 Jan 2022 00:08:00 +0000, Michael Kay wrote:
>> What does the WSP (WSP = whitespace) signify? Does it signify:
>>
>> (a) Space between the first attribute and a second attribute? E.g.
>> WSP attribute-name '=' "value"
>> (b) Space just prior to the end angle bracket? I.e., WSP '>'
>
> It doesn't signify anything. The parser just has to skip it. That's
> hardly difficult.
Seriously. No look-ahead required, either. The parser's past the
start-tag start indicator ('<' and the start-tag identifier (a qname).
If the next thing (discarding whitespace) isn't '>' or '/' (followed by
'>'), then it must be another qname, hold onto it, keep discarding
whitespace, expecting '=' now, then either ' or " (and make a note of
which it is, because its the value-start indicator and the
value-complete indicator and the other one is then just another
character in the value space if it appears), and the value is the
content between value-start and value-end, and you're done, with a
briefly-save attribute-or-namespace name, and a value, and that's that
production, repeat it until you get to '>' and no look-ahed
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



