Revised XML specifications from W3C

happygeek 0 Tallied Votes 290 Views Share

It has been a busy week for both W3C and anyone who is serious about XML. The W3C XML Core Working Group has published the fourth edition of XML 1.0, and second editions of XML 1.1 and Namespaces in XML 1.0 and 1.1.

Forming, as they do, the bedrock for W3C-defined technologies used in the querying, transforming, displaying, encrypting, and optimizing of XML their importance cannot be overestimated. As well as correcting ‘all known errata’ according to a W3C release, the revised specifications also clarify where before there was ‘potential for misunderstanding’ although I have to admit I have yet to read them in full and compare to the previous versions so cannot actually comment on the particulars. Hey, sometimes life is just too short and pool too inviting to spend time going over XML specs with a fine toothcomb!

Not so for the folk at W3C of course, they have vowed that by the end of this year they will have published their recommendations for XML Query 1.0 and XSLT 2.0, as well as revising the XML Schema which is heavily used in SOAP-based Web services, and planning additions to XML Query that go beyond the 1.0 version. If that wasn’t enough, the XML Processing Model Working Group are also expected to publish the first draft of an XML language for specifying sequences of operations on XML documents, such as transformation, validation, inclusion and decryption, based on existing XML pipeline products and free and open source designs.

And the final bit of news coming out of W3C that will ignite a spark of interest from web developers is regarding compression techniques that can be applied to XML documents. Apparently a number of XML-specific technologies for improving the efficiency of XML storage, transmission and processing have been developed and W3C has chartered a Working Group on Efficient XML Interchange to expand the outreach of XML into further domains that require even greater performance and additional capabilities such as streaming.

Dani AI

Generated

Picking up 's roundup, a short practical summary of what the W3C revisions mean for everyday XML work and what to watch for.

The bottom line on versions: most interoperability concerns were addressed by folding errata into the XML 1.0 Fifth Edition (published 2008), which relaxed the name-character rules so many of the benefits that XML 1.1 aimed to provide are available under XML 1.0. See the XML 1.0 (Fifth Edition) recommendation. (w3.org) For the specific change that relaxed name restrictions, consult the XML 1.0 errata (erratum E09). (w3.org)

Character and compatibility notes: XML 1.1 broadened allowable name characters and permitted certain control characters in escaped form (and tightened some other rules), but uptake of XML 1.1 has been limited; the WG itself noted few XML 1.1 documents in the wild. (w3.org) Practical rule: prefer XML 1.0 (Fifth Edition) for wide interoperability unless an application explicitly requires XML 1.1 features, and always verify parser/tool support before publishing XML 1.1 documents.

Namespaces and namespaces pitfalls: the second-edition Namespaces spec clarifies important points—relative namespace URIs are deprecated and the default namespace does not apply to attributes. Use absolute (stable) namespace names and explicit prefixes for namespaced attributes. (w3.org)

Quick example (attributes are not in the default namespace):

<root xmlns="http://example.com/ns">
  <child id="123"/>         <!-- id is NOT in http://example.com/ns -->
  <child xmlns:ex="http://example.com/ns" ex:id="123"/> <!-- ex:id IS in the namespace -->
</root>

Performance and pipelines: the EXI binary format (W3C Recommendation, 2011) provides compact, high-performance interchange when bandwidth or CPU matters; adoption requires matching encoder/decoder support on both ends and careful interoperability testing. (w3.org)

Short checklist for maintainers: stick with XML 1.0 (Fifth Ed) for interchange, prefer absolute namespace URIs and explicit prefixes for attributes, verify parser/validator behavior for any XML 1.1 use, and evaluate EXI only after confirming toolchain support and measuring real benefits.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.