in reply to Converting HTML tags into uppercase using Perl

...and, while uppercase tags are allowed under html 4.01, they are NOT allowed in xhtml xml   Slap ww upside the head!... so if this is other than homework, steve_g50 may wish to learn a bit more about .html as well as about perl.

Update: Grinder is, of course, correct both re xml and re need to provide cites, and Fletch, thanks! Your cite is bang_on.

Moral (and message to self): ensure caffeine levels are within normal operating range and put brain in gear before typing.

  • Comment on OT Re: Converting HTML tags into uppercase using Perl

Replies are listed 'Best First'.
Re: OT Re: Converting HTML tags into uppercase using Perl
by grinder (Bishop) on Nov 29, 2005 at 12:43 UTC
    uppercase tags [...] are NOT allowed in xml

    ww may wish to learn more about XML, or least be able to quote the specification chapter and verse in order to back up such a claim. I've been doing XML for years (and SGML before that) and I've never heard of such nonsense.

    A start-tag is a Name, and a Name is one or more Letters (more or less, ignoring namespace issues), and a Letter may be drawn from many, many things, including, but not limited to, uppercase and lowercase letters.

    See the section on logical structures in the XML specification for more information.

    Update: my bad, I did ponder how ww could have come up with such an outlandish idea (because his/her advice is spot-on in general), and I failed to make the connection to XHTML. I just wanted to quash the meme before it got any further.

    • another intruder with the mooring in the heart of the Perl

      I think he misspoke and meant "XHTML" rather than XML. While you are correct that XML allows upper-, lower-, and mixed-case tag names, the XHTML spec does specifically require lowercase:

      4.2. Element and attribute names must be in lower case

      XHTML documents must use lower case for all HTML element and attribute names. This difference is necessary because XML is case-sensitive e.g. <li> and <LI> are different tags.

      http://www.w3.org/TR/xhtml1/#h-4.2