1 / 6

XML Design for Streamability

XML Design for Streamability. Roger L. Costello November 24, 2013. Design XML for Streaming?.

thad
Download Presentation

XML Design for Streamability

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML Design for Streamability Roger L. Costello November 24, 2013

  2. Design XML for Streaming? Philosophically I'm somewhat opposed to designing XML for streaming or for any particular process or processing paradigm. This is sometimes necessary, but more often I think it would be optimizing in the wrong place. Would you be comfortable if someone said you can't have cross-references in your user manual because they prevent you from streaming in your production process? I'd rather have the cross-references, and then if I need to stream, I can figure out how to do that. Wendell Piez xsl-list, 11/22/2013

  3. Design XML for Streaming? • Wendell makes a really good point. • However, sometimes with a small tweak here and there, an XML design can be changed from one that is not streamable to one that is streamable. See next slide.

  4. An XML Design That Is Not Suited For Streaming • Below is an XML document that contains data about a military mission. It describes the type-of-mission (training, actual, simulation) and the weapons used. <Mission><Type>simulation</Type><WeaponRelease><Munition>CBU-89</Munition><Quantity>20</Quantity><Target>Enemy terrorists</Target><DateTime>2013-05-11T08:00:00</DateTime></WeaponRelease></Mission> Suppose that processing this requires knowing the type-of-mission. Since the type is in a preceding node (and XSLT streaming prohibits access to preceding nodes), the XSLT program cannot process WeaponRelease.

  5. Revised XML Design So That It Is Suited For Streaming <Mission type="simulation"><WeaponRelease><Munition>CBU-89</Munition><Quantity>20</Quantity><Target>Enemy terrorists</Target><DateTime>2013-05-11T08:00:00</DateTime></WeaponRelease></Mission> The data about the type-of-mission is now in an ancestor’s attribute, so the XSLT can process WeaponRelease.

  6. Lesson Learned • A simple change in XML design can make the difference between a streamable XML versus a non-streamable XML.

More Related