On Fri, 11 Aug 2000, Henrik Tougaard wrote:

> I have been trying to test the limits of the nice new XMLSub feature in
> Apache::ASP, and seem to have discovered a bug.
> 
> With this simple .asp page I get an error:
> 
>     <Fiks:test Start="<b>"> </Fiks:test>
> [My XMLSubMatch is set to Fiks:\w+  - the name of the subroutine doesn't
> matter]
> 
> It seems as if the '>' in the '<b>' argument confuses the parser.

[snip]

> Is this a (mis)feature or a parser bug?

parser bug - it should have died earlier at the < sign :-)

XML attributes can't contain "<" or "&" characters, or the same quote that
they are surrounded by. The following are the encodings you can use
(and XMLSubsMatch needs to unravel):

<   =>  "&lt;"
>   =>  "&gt;"
&   =>  "&amp;"
"   =>  "&quot;"
'   =>  "&apos;"

Note that only "<" is needed for your example (since encoding the
">" isn't mandatory in XML generally).

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org

Reply via email to