Source: InfoQ
IBM's WebSphere feature packs are optionally installable product extensions to the application server offering new features. IBM's recently released Feature Pack for XML provides application developers with support for the most recently ratified set of W3C XML standards:
- XQuery 1.0: a newly introduced query and functional programming language designed to query collections of XML data. It uses the XPath expression syntax to address specific parts of an XML document supplementing it with "FOR, LET, WHERE, ORDER BY and RETURN" expressions. Commonly abbreviated to "FLWOR" these expressions may be used for performing joins across multiple XML streams in a similar manner to SQL.
- XPath 2.0: an expression language for working with XML documents. The result of an XPath expression is typically a selection of nodes from the input documents or an atomic value. XPath 2.0 is now a subset of XQuery 1.0. The most notable change from XPath 1.0 to XPath 2.0 is the introduction of a much richer type system: Every value is now a sequence, with a single value being treated as a sequence of length 1. XPath 2.0 supports "Schema Awareness" meaning that elements of the tree have type annotations which can be used to navigate the XPath. A processor must offer schema awareness for the built in types such as string, number, date and so on. It may optionally support user defined types, which can greatly simplify the required expressions. For example an internet mailing company might have an XML document with a billing address and delivery address associated with a customer's order. If both address fields have a common AddressType the expression for //element(*, tns:AddressType)/postalCode would return the post code for both addresses. XPath 2.0 also offers a greatly expanded set of functions and operators. New functions include regular expression syntax for pattern matching, new date functions such as current date, and new numeric functions such as floor, ceiling and round. New operators include intersect and except.
- XSLT 2.0: a programming language used to transform XML into a new XML format, or into another presentation format such as HTML, XHTML or SVG. Like XQuery 1.0, XSLT 2.0 uses XPath 2.0 as a path language. XSLT 2.0 adds a number of new capabilities including grouping, the ability to output multiple results from a single input document, and the ability to define functions in XSLT that can be called from XPath. As for an XPath 2.0 processor an XSLT processor may optionally be "Schema Aware". Being so offers a number of advantages, such as the ability to validate input trees prior to the XSLT transformation, and to validate output trees to ensure that the XSLT transformation is producing valid output. You are also able to specify data types for variables, input parameters, return values from functions, user-defined functions and templates. XSLT continues to be the primary choice for transforming XML data, whilst XQuery is expected to become the standard for querying XML documents. Whilst both XQuery and XSLT 2.0 use XPath 2.0 as a path language, the XQuery extensions to XPath 2.0 are not of practical relevance to XSLT developers.
0 comments:
Post a Comment