Slashdot Mirror


XML 1.1 Spec Hits Some Snags

oever writes "News.com reports that the new XML 1.1 specification defines a new newline character, making it incompatible with the 1.0 specifiation. Apparently, IBM has been pushing the new character to avoid having to modify their software, thereby invalidating everybody else's XML software."

41 of 257 comments (clear)

  1. It's only a candidate specification. by tomhudson · · Score: 5, Insightful
    This specification is being put forth as a W3C Candidate Recommendation of XML 1.1.

    If you don't like it, keep in mind that you CAN bitch about it and help change this.

  2. Read the Unicode spec.... by vidarh · · Score: 5, Informative

    Unicode 3.2 define 0x85 as a newline character. This change just make XML follow the Unicode spec, which isn't unreasonable considering that the parser is expected to use Unicode internally (or to act as if it does).

    1. Re:Read the Unicode spec.... by Anonymous Coward · · Score: 5, Insightful

      Like the man says, read the Unicode specification! Unicode defines a far wider range of characters than simple 7 or 8bit ASCII text can cover, and the à is simply mapped into another Unicode byte pair. You won't loose the ability to use à in your XML documents, you just use Unicode.

    2. Re:Read the Unicode spec.... by gorilla · · Score: 5, Informative

      It's more complicated than that. Unicode has
      2029 - paragraph seperator
      2028 - line seperator
      000D - CR
      000A - LF
      0085 - NEL (Next Line)
      Any of these could be interpeted as the end of a logical line.

    3. Re:Read the Unicode spec.... by vidarh · · Score: 5, Informative

      And if you read the XML 1.1 spec you'll see that all of the characters you've listed above except for 0x2029 are interpreted by XML 1.0 as the end of a logical line.

    4. Re:Read the Unicode spec.... by julesh · · Score: 5, Informative

      No, not really. It means that *some* XML files can't be edited with these editors. But then that was true already; some might have used \r or some other of the list of characters.

      What it *does* mean is that editors on other systems than Unix are able to edit XML files. It means I can create an XML file in DOS 'edit' which uses \r\n, or on a mac with an editor that might use \r, or on (apparently) an IBM system where the standard text editors use \u85.

      This is absolutely essential. It does however mean that in order to support *all* XML files, you need to recognise *all* of those line endings. As always, its easier to support a subset, but harder to support everything. However the fact that existing software works at all is very important, so I think they're moving in the right direction.

    5. Re:Read the Unicode spec.... by innate · · Score: 5, Informative

      There are no 2-byte Unicode characters, only encodings (such as UTF-16) which use two or more bytes to represent each character. Some Unicode characters, those not in the Basic Multilingual Plane (BMP), require more than two bytes to represent in UTF-16.

      And 7-bit ASCII is a strict subset of UTF-8 encoding. UTF-8 encodes each character to one or more bytes, with characters up to 127 defined the same as in ASCII. If your text is strict 7-bit ASCII, it is also a UTF-8 file.

      You could also use UTF-32 (UCS-4), which represents each character as 4 bytes, but that is overkill for most applications.

      The main problem with multibyte encodings such as Shift-JIS and Big 5 was lead-byte detection: you couldn't jump into the middle of a string and determine if you were looking at the only, first, or second byte of a character. You had to start parsing at the beginning of the string in order to synchronize your character detection. Unicode has done away with this by strictly defining the lead byte ranges in such a way that there is never any ambiguity.

      --
      No, I don't want to explore the Recycle Bin.
  3. So? by Anonymous Coward · · Score: 5, Informative
    1.0 : To simplify the tasks of applications, the characters passed to an application by the XML processor must be as if the XML processor normalized all line breaks in external parsed entities (including the document entity) on input, before parsing, by translating both the two-character sequence #xD #xA and any #xD that is not followed by #xA to a single #xA character.

    1.1 : To simplify the tasks of applications, the characters passed to an application by the XML processor must be as if the XML processor normalized all line breaks in external parsed entities (including the document entity) on input, before parsing, by translating all of the following to a single #xA character:

    • the two-character sequence #xD #xA
    • the two-character sequence #xD #x85
    • the single character #x85
    • the single character #x2028
    • any #xD character that is not immediately followed by #xA or #x85.


    I don't get it, whats the problem here? Surely the 1.1 spec simply extends the available EOL characters. It certainly doesn't remove any existing characters that are present in the 1.0 spec. How does it break backwards compatability?
    1. Re:So? by vidarh · · Score: 5, Informative

      In which character set? Certainly not in Unicode, so if anyone used 0x85 as à in XML documents using any Unicode encoding they've messed up. à (latin letter a with grave) is 0xE0, and À (lating chapital letter a with grave) is 0xC0.

    2. Re:So? by vidarh · · Score: 5, Informative
      To expand on that, in ISO-Latin in general and certainly ISO-Latin-1, and thus by extension Unicode (which maps to ISO-Latin-1 for code points in the range 0x00 to 0xff), the area 0x80 to 0x9f was on purpose not used for displayable glyphs in order not to cause interoperability problems with 7bit systems if an 8bit text was moved between systems and the 8bit was stripped off.

      So unless you are using a non-Unicode, non-ISO-Latin encoding there are no printable characters in that range, and if you're using another character you will need to remap the characters before considering any of the rules in the XML spec anyway, since those rules refer to the unicode codepoints.

    3. Re:So? by Sir+Tristam · · Score: 5, Informative
      0x85 is à (a grave). So everyone in France?
      No, you're looking at the extended ASCII chart. What this is talking about is Unicode. A Unicode 0x0085 is the control character NEL (http://www.unicode.org/charts/PDF/U0080.pdf, page 3) NEL is NExt Line.

      Chris Beckenbach

    4. Re:So? by greenius · · Score: 4, Informative

      Hex dump of this message:

      30 78 38 35 20 69 73 20 e0 20 20 28 61 20 67 72 : 0x85 is à (a gr
      61 76 65 29 2e 20 20 53 6f 20 65 76 65 72 79 6f : ave). So everyo
      6e 65 20 69 6e 20 46 72 61 6e 63 65 3f 0a 09 09 : ne in France?...

      --
      I copied this sig from someone else (but where did they get it from?)
  4. One tiny little update ??? by Dave21212 · · Score: 5, Interesting

    Considering what some other vendors have done to standards, one tiny addition (which is an improvement) proposed by IBM shouldn't be a big deal. Sure, it feeds the news hounds, but seriously, compare the scale of the impact of one desirable change to all the suffering caused by other such changes in emerging standards (Microsoft's in particular).

    IBM has contributed so much, it's only natural that some changes might be characterized in the news as benefitting them more than other parties. Is anyone that worried about adding a new EOL character in 1.1 that XML 1.0 "chokes" on ?

    --
    "Whoever would overthrow the liberty of a nation must begin by subduing the freeness of speech."--Benjamin Franklin
    1. Re:One tiny little update ??? by PainKilleR-CE · · Score: 5, Insightful

      IBM has contributed so much, it's only natural that some changes might be characterized in the news as benefitting them more than other parties. Is anyone that worried about adding a new EOL character in 1.1 that XML 1.0 "chokes" on ?

      and, as an IBM rep pointed out in the article, XML documents are supposed to specify what version they're using at the top of the document. Any proper XML parser should read that it's 1.0 and interpret the newline character as 1.0 would.

      --
      -PainKilleR-[CE]
    2. Re:One tiny little update ??? by PainKilleR-CE · · Score: 5, Informative

      The problem is that the data with the NEL character already exists, and is already generating these types of errors when it's translated into XML (or when XML is generated on these mainframes). From the original change proposal by IBM:

      Problem areas include:

      * Processing XML documents or DTDs generated on OS/390 systems, with XML 1.0 compliant parsers.
      * Processing XML documents or DTDs, using native OS/390 system tools.
      * Processing XML documents or DTDs retrieved from OS/390 database or file systems, in non-OS/390 environments.

      XML documents that contain [NEL] characters are declared invalid or not well-formed by XML 1.0 compliant parsers.


      Essentially 'just fix the software' involves operating system-level changes as well as possibly changes to most software that interprets NEL characters on that OS. As it stands, they're going to have a problem anyway, and it's probably best to simply add the change to the XML standard to fix what was essentially an osmission in the 1.0 standard.

      --
      -PainKilleR-[CE]
  5. Here's A Good Point by LISNews · · Score: 5, Interesting
    From the article, which kind of put it into perspective for me:


    "The truth is that there are a lot of IBM mainframe systems out there, and they're very important," said Ronald Schmelzer, an analyst with ZapThink. "The truth is that this is not really for IBM's benefit, it's for IBM's customers' benefit. And I think that's fair. An international standard shouldn't change for the benefit of a company's future project, but it's clear that end-of-line characters are not a strategic business strategy for IBM."

  6. Considering ... by DigitalDreg · · Score: 5, Insightful

    That IBM gave the world SGML and XML by derivative ....

    That a lot of useful data exists on IBM mainframes ....

    That EBCDIC doesn't "cleanly" map into Unicode by design like ASCII/UTF-8 does ...

    That this benefits IBM users and customers, not IBM because there is no strategic market position related to new-line characters ...

    That this was a recommendation reached by a group ...

    Let it live and get a life.

  7. 2 line summary by Shagg · · Score: 5, Insightful

    1) XML 1.0 does not follow the Unicode spec
    3) XML 1.1 makes a change so that it does follow the spec

    What's the complaint again?

    --
    Unix is user friendly, it's just selective about who its friends are.
  8. Re:XML rant. by russellh · · Score: 5, Funny

    parse error, line 1: no trailing '

    --
    must... stay... awake...
  9. What do they mean, "XML 1.0 chokes"? by st.+augustine · · Score: 5, Insightful

    Does anyone have a link to a page explaining what's really going on? Last I heard, XML doesn't even have a concept of newlines -- most of the time all white space gets normalized (collapsed). The only problem that I could see is if the character wasn't part of the spec for white space. Now, people may have written XML software that chokes, but I think that's a slightly different story. So is the problem that the new character shows up as bogus text content in elements? And is that true for all XML processing software, or does software that relies on a proper Unicode engine not have the problem? What's the deal?

    --

    -- Some things are to be believed, though not susceptible to rational proof.
  10. CRLF in EBCDIC by spacefight · · Score: 4, Interesting

    is 0x156C in my programming area, 'nough said. EBCDIC is still live. Did you know that about 90% of todays enterprise data is stored in EBCDIC chars? You better update the XML specs :)

  11. New Newline Character? by RAMMS+EIN · · Score: 4, Interesting

    Anybody care to explain to me _why_ we need so many different newline characters | sequences? I see a point in having a single \x0a character, because a newline is one character. I see a point in having \x0a\x0d and \x0d\x0a, because they represent more accurately how a typewriter does it (and conform better to the original ASCII standard, I think). However, one of these is kind of redundant, and history seems to have decided that this is \x0a\x0d. But why, for goodness's sake, do we need all those others??? Why is it that people always do things their own way instead of following standards that work fine???

    --
    Please correct me if I got my facts wrong.
    1. Re:New Newline Character? by gorilla · · Score: 5, Informative

      Each of them has a different function. 000A and 000D are for compatability with ASCII. 0085 is for a unified character to replace the 000D 000A pair used on some OS's. However, some programs (eg notepad) use line breaks when they really mean paragraph seperators, so Unicode defined two codes which mean REAL line seperator, and REAL paragraph seperator. This report explains it quite clearly.

  12. W3C still meeting over IBM resolutions by spoonyfork · · Score: 5, Funny

    World Wide Web Consortium still meeting over IBM resolutions

    Posted: Sat, 19 Oct 2002 0:18 AEST

    The five permanent members of the World Wide Web Consortium are meeting overnight in an attempt to agree on a resolution on IBM. W3C diplomats say there are signs HP and Sun are now moving towards a compromise, after weeks of wrangling over the XML issue.

    HP wants clear instructions given to Microsoft that it return to the World Wide Web Consortium before taking legal action, while the Microsoft wants more leeway for itself and its allies. Meanwhile, the HP CEO, Carly Fiorina, has given another strong warning against the use of force against IBM.

    Speaking at the opening of a summit of XML using companies in the Silicon Valley, Mrs Fiorina said legal force must only be used as a last resort. She called for all conflicts to be resolved in ways respecting international law, as this was the only guarantee against what she described as "adventurist" policies.

    --
    Speak truth to power.
  13. *Shrug* by Fweeky · · Score: 5, Insightful
    If you're using the XML prologue like you're supposed to, your XML 1.0 documents will have:
    <?xml version="1.0" ?>
    At the top. The parsers will then parse using the XML 1.0 specification and you won't notice a thing.

    If you don't use it, tough luck, you should have followed the original recommendation more closely. Lucky for you it's not exactly difficult to automatically process XML documents and add the prologe later.
  14. XML 1.1 - Problem? by Plud · · Score: 5, Informative

    A newline character should have no impact on with respect to backwards compatibility. The only negative impact with regards to a newline character should be contained to poorly written DOM code that parses out all nodes instead of just relavent nodes. Similar issue with SAX. Even if there were a backwards compatibility issue with a new XML spec, most people define their version number in their documents so the parser knows which spec to follow while parsing it.

  15. Full Details by Matts · · Score: 5, Informative

    Full details of why this has the potential to break things are on the XML news site Cafe Con Leche.

    Please read that before making uninformed comments - news.com isn't where you'll find technical information about this problem.

    --

    Matt. Want XML + Apache + Stylesheets? Get AxKit.
    1. Re:Full Details by Anonymous Coward · · Score: 5, Interesting

      So I want off and read it (Or at least, what appears to be it. There is a rant someway down the page you link to. Is that it?)

      So anyway, I read it. Surprise the surprise, the guy doesn't actually offer any actual examples of where this change would actually cause a break in itself. All he basically does is cry that 0x85 is designated as a new line character, and how dare IBM do such a thing! Then he goes into a rant about IBM, monopolies and patents. Uh huh.

      The fact is that 0x0085 is designated as NEL (NEw Line) as part of the Unicode specification. XML 1.1 allows the use of Unicode, which XML 1.0 did not. Therefore, if you are using XML 1.1, and you are using 0x85 and expect to see a grave a, your document isn't a Unicode compliant document anyway, and you shouldn't be complaining that a non compliant document doesn't work with a compliant parser.

      If all these people want to use 0x85 in their XML 1.1 documents, then they'll have to properly convert them to Unicode as the specification allows. Surprising, that.

  16. The proposed change by Srin+Tuar · · Score: 4, Informative
    Rather than reading through the whole spec:
    here is a summary of just the proposed change.


    It seems to comply with unicode just fine, I dont see what the controversy is really.

  17. New Line and Characters by JasonSkywalker · · Score: 5, Funny

    Let us not forget that it was New Line that callously yanked Tolkien's loveable Tom Bombadil! It was New Line that turned Arwen into a heroic Nazgul-racing babe-elf! It was New Line that left out poor Glorfindel and his big moment at the river altogether!

    I don't know about anyone else, but I think it's only fitting that a New Line character be messed with.

    ---

    --
    I have Unix underpants.
  18. Re:version naming by Fweeky · · Score: 4, Interesting
    if these two specifications are NOT compatible, then it would make sense that they would name the new one XML2.0 no?

    Not really. The change isn't exactly huge; it makes XML a bit more consistant with regard to UTF, but I don't see it breaking anything other than for those who both:
    • Failed to specify a prologue (and hence charset, meaning they accepted the default utf-8), and;
    • Actually used #x85 or #x2028 to encode anything useful other than newline.

    TBH if you were that lax in specifying your XML version and characterset, and then made use of non-printable characters that actually had known uses in the default charset, you deserve everything you get.
  19. This is just not that big a deal. by BobGregg · · Score: 4, Insightful

    As the quote from IBM points out in the article, this issue is just a subset of the larger problem with Unicode compatibility in XML 1.0. And as someone else pointed out, if document creators are using the XML headers appropriately to begin with, then parsers would handle documents correctly anyway. I'm also willing to bet that the percentage of existing XML documents which contains this particular character (0x85), and which are not already on IBM mainframes, is *extremely* small.

    Face it: this just isn't that big a deal. It's good for industry acceptance and propagation of the standard, at very low cost. Move along, there's nothing to see here.

  20. In other news... by T.E.D. · · Score: 4, Funny

    EBCDIC has won yet another chess game against the Grim Reaper.

  21. Re:For those missing the problem, also � by Anonymous Coward · · Score: 5, Informative

    From the XML 1.1 spec

    The W3C's XML 1.0 Recommendation was first issued in 1998, and despite the issuance of many errata culminating in a Second Edition of 2000, has remained (by intention) unchanged with respect to what is well-formed XML and what is not. This stability has been extremely useful for interoperability. However, the Unicode Standard on which XML 1.0 relies for character specifications has not remained static, evolving from version 2.0 to version 3.1 and beyond. Characters not present in Unicode 2.0 may already be used in XML 1.0 character data. However, they are not allowed in XML names such as element type names, attribute names, enumerated attribute values, processing instruction targets, and so on. In addition, some characters that should have been permitted in XML names were not, due to oversights and inconsistencies in Unicode 2.0

    So XML 1.0 used Unicode 2.0, but not properly. XML 1.1 fixes that, and defines that all Unicode 3.2 byte pairs are now valid when used in an XML document. As part of this change, XML 1.1 also correctly allows the use of the Unicode 0x0085 NEL character as an EOL marker, which is totally compliant and consistent with the Unicode 3.2 specification.

    In other words, if you're using any character encoding other than Unicode 3.2, your XML document isn't compliant with XML 1.1 and you shouldn't ever expect ISO-Latin 0x85 to be displayed as an ellipses.

  22. Re:What about poor old Acorn users? by gorilla · · Score: 4, Insightful

    The Atom, which the BBC was based upon came out in 1979.. At that time there wasn't an IBM PC, and the world was very diverse. You could choose Apples (0D), CP/M (0D,0A), Unix (0A), Primos (8A), VMS - which is either records or 0D. Also, it was quite rare for files to be shared amongst different systems - a file created on an Apple would stay on an Apple forever. A decision which looks strange in 2002 looks as sensible as any other option in 1979.

  23. Re:What? No newline? by dossen · · Score: 5, Informative
    Where did you get that awful idea of using />? The proper way is to inclose the paragraph in p-tags like so:
    <p> Your text here</p>

    Using the paragraph tags as large linebreaks is a very bad habit from the bad old days of the web. Please head to W3C and study the recent standards, and validate your documents before publishing (using a validator, not a browser).
    Ohh... And this is actually an issue about XML 1.1 unicode support, so worrying about HTML is quite premature (XHTML is still XML 1.0, and will remain so untill XML 1.1 becomes a standard (or recommendation in W3C-speak).
  24. no. it's fine. by MenTaLguY · · Score: 4, Informative

    Doesn't make this XML files uneditable with most editors, like vi, pico and gedit? They all use \n (byte 10) as newline character.



    No. XML is defined in terms of Unicode, but XML files can be stored in any encoding with a known mapping to Unicode.



    Most XML files these days are using iso-8859-1 or UTF-8, both of which manage fine in vi/pico/gedit.



    chars 32-127 are identical in ASCII and Unicode, and iso-8859-1 is exactly identical to the bottom 8-bits worth of Unicode.



    Also, UTF-8 is an encoding of the full Unicode range that is backwards-compatible with 7-bit ASCII.



    in any case, note the entry for LF in your parent post -- 000A (hex) = 10 (decimal).

    --

    DNA just wants to be free...
  25. ever wondered what alt-gr is for? by DrSkwid · · Score: 4, Funny

    damn that lameness filter

    Reason: Your comment looks too much like ascii art.

    ever wondered what alt-gr is for?

    raw a e i o u 4 `
    alt-gr á é í ó ú ¦

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  26. The other side of the argument by smallpaul · · Score: 4, Interesting

    The Slashdot commentary has been pretty one-sided so I'll try and address the other side. First, IBM has said that this fix is for their mainframe customers, not for themselves. But nobody in the XML world has heard from these customers. As far as I know, no user has submitted a request for this NEL feature. No user has sent a message to the many XML mailing lists. No user has posted to Slashdot. Updating all of the XML parsers in the world is really expensive and if the mainframers don't care enough about the problem to storm the gates then maybe it isn't hurting them that badly. So from a democratic point of view, we're going to make life harder for the people who care enough to scream out loud in order to make life easier for the small minority who perhaps are not even that badly impacted.

    Further discussion is on xml.com.

  27. Mod Article -1 Troll by kalidasa · · Score: 4, Insightful

    This is just a way to spark a holy war "my newline character is better than yours" debate. The proposal makes perfect sense - it brings XML into line with Unicode and ISO-10646.

  28. Re:What? No newline? by PainKilleR-CE · · Score: 4, Informative

    Before XHTML, the p tag had no closing tag. The end of a paragraph was defined by the beginning of the next one. So that wasn't necessarily a "bad habit" back then.

    This is not correct. The P tag ALWAYS had a closing tag, but it was not REQUIRED. Here's the P tag section for HTML 2.0:
    http://www.w3.org/MarkUp/html-spec/L2index.html# P


    was still allowed, but all it did was start a new paragraph.


    Actually, it just ends the current paragraph. You can't use the closing tag without the beginning tag and still have well-formed HTML. Since it wasn't required, though, there are probably many different methods of handling it as far as HTML parsers/browsers are concerned. The only reason it would start a new paragraph is because it designates the end of the current paragraph, and another paragraph is what typically follows the end of a paragraph within a document.

    --
    -PainKilleR-[CE]