Sounds good to me.

-Jim


On Aug 4, 2011, at 4:21 PM, Jeff Rogers wrote:

> Hi all,
> 
> I'm implementing a minor enhancement to the adp parser to make null end tags 
> (aka empty elements or minimized tags) work.  Or more simply, if you have a 
> registered adp tag where the end tag matches the opening tag, then rather than
> <mytag name="value"></mytag>
> you can simply write
> <mytag name="value" />
> to create the tag with empty contents.
> 
> What my code does is to check that the element ends with a '/', the endtag 
> begins with a '/', and the endtag matches the beginning tag, and if all that 
> holds, then parse it as a complete tag pair with blank contents.
> 
> Two minor caveats: there must be something in between the tag and the closing 
> />, i.e., "<mytag/>" will not work.  And to keep the attributes clean, a 
> trailing '/' in *any* attribute string (including those without an endstring) 
> will be dropped.  (So the attribute set will no longer contain /="/")
> 
> This does not make it into an xml parser, but merely allows a common xml-ish 
> construct to work.
> 
> Two questions:
> 1.  Is the a good idea / does anyone object?
> 2.  Have I forgotten anything?
> 
> Cheers,
> -J
> 
> PS: in case you doubted that macros in C suck, remember that
> #define STREQ(a,b)     (((*a) == (*b)) && (strcmp((a),(b)) == 0))
> is NOT the same as
> #define STREQ(a,b)     ((*(a) == *(b)) && (strcmp((a),(b)) == 0))
> 
> 
> --
> AOLserver - http://www.aolserver.com/
> 
> To Remove yourself from this list, simply send an email to 
> <lists...@listserv.aol.com> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to