请输入您要查询的百科知识:

 

词条 Streaming Transformations for XML
释义

  1. Overview

  2. Specifications

  3. Similar projects

  4. External links

Streaming Transformations for XML (STX) is an XML transformation language intended as a high-speed, low memory consumption alternative to XSLT version 1.0 and 2.0. Current work on XSLT 3.0 includes Streaming capabilities.

Overview

STX is an XML standard for efficient processing of stream-based XML. As we will discover, XSLT is not well suited to stream based processing, and STX fills this niche.

Conventional XML processing involves loading the entire XML document into memory for use. This is as opposed to SAX which streams XML events such as "open element" "close element" "text node" (and so on) so that other software that can begin interpreting these immediately -- before the end of the file is reached. Unfortunately some software can't effectively use XML fragments this way and must build up the whole document to begin processing. So is the case with XSLT. Because XSLT's XPath can select any node throughout the document it must have the entire document available in memory. Understandably, this could be perceived as a bottleneck.

STX only allows queries immediately surrounding the current node so it can quickly start transforming and outputting SAX event nodes as they arrive. As it can discard nodes immediately after processing the memory use is significantly lower than that of XSLT. Having a limited query scope is a defining characteristic of STX.

This architectural decision intentionally marginalises STX as a niche language. Indeed, it would be wrong to say that STX is a general purpose transformation language; however, if your transformation needs can be met by STX then it's an efficient and smart choice.

Specifications

STX's query language is called STXPath and is based on XPath 2.0.

Implementations of STX are available in Java and Perl.

Similar projects

Unlike STX which is declared using an XML syntax, these two projects associate SAX events with callback functions:

  • Xineo OAX
  • SAX Adapter

External links

  • STX home page
  • An Introduction to Streaming Transformations for XML

1 : XML-based standards

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/10 11:40:17