[thelist] Office 2003, XML, and CMS
Simon Willison
cs1spw at bath.ac.uk
Sun Aug 24 10:48:43 CDT 2003
Burhan Khalid wrote:
>><article Type=33>
>> <title>News Flash: Maple Leafs won the Stanley Cup!</title>
>> <summary>After an overwhelmingly-dominant season, the Maple Leafs have
>>finally brought Lord Stanley home!</summary>
>> <author>GravyFace</author>
>> <body>blah blah blah <emphasis id=1>BLAH!</emphasis>. blah blah <emphasis
>>id=2>BLAAAAAH!</emphasis></body>
>></article id=555>
>
> I'm assuming you mean </article Type="33">
Either way it's invalid XML - you can't have attributes in a closing
tag. Because XML has to be well formed it must always be properly
nested, so when the </article> tag is reached it can logically only
belong to the <article Type="33"> opening tag (note that quotes around
attributes are also mandatory in XML). Thus there is no need to
duplicate attributes in the end tag, and in fact doing so will
invalidate the XML and cause any compliant parser to stop with an error
message.
Cheers,
Simon Willison
More information about the thelist
mailing list