xalan

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xalan 
An XSLT processor
License:Apache License
URL:http://xml.apache.org/xalan-j/
Description:Xalan-Java is an XSLT processor for transforming XML documents into HTML, text, or other XML document types.
Package NameComment
org.apache.xalan
org.apache.xalan.client Xalan Client Package.

Implementation of Xalan applet.

org.apache.xalan.extensions Xalan Extension Mechanism Package.

Implementation of Xalan Extension Mechanism.

org.apache.xalan.lib Xalan and EXSLT Extensions.

Extension elements and functions shipped with Xalan-Java, including EXSLT functions.

We are adding extensions to this package.

org.apache.xalan.lib.sql Xalan SQL Extension

Provides extension functions for connecting to a JDBC data source, executing a query, and working incrementally through a "streamable" result set. Streaming (reuse of a single row node to traverse the result set) is the default mode of operation. If you want unlimited access to the entire result set, you can cache the query result set (1 row node for each row in the result set).

If you use streaming mode (the default), you can only access row elements one at a time moving forward through the result set. The use of XPath expressions in your stylesheet, for example, that attempt to return nodes from the result set in any other manner may produce unpredictable results.

XConnection provides three extension functions that you can use in your stylesheet.

  1. new() -- Use one of the XConnection constructors to connect to a data source, and return an XConnection object.

  2. query() -- Use the XConnection object query() method to return a "streamable" result set in the form of a row-set node. Work your way through the row-set one row at a time. The same row element is used over and over again, so you can begin "transforming" the row-set before the entire result set has been returned.

  3. close() -- Use the XConnection object close() method to terminate the connection.

The query() extension function returns a Document node that contains (as needed) an array of column-header elements, a single row element that is used repeatedly, and an array of col elements. Each column-header element (one per column in the row-set) contains an attribute (ColumnAttribute) for each of the column descriptors in the ResultSetMetaData object. Each col element contains a text node with a textual representation of the value for that column in the current row.

Example

This example displays the result set from a table in a sample InstantDB database.

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0"
                xmlns:sql="org.apache.xalan.lib.sql.XConnection"
                extension-element-prefixes="sql">
  <xsl:output method="html" indent="yes"/>
  <xsl:param name="query" select="'SELECT * FROM import1'"/>
 
  <xsl:template match="/">
    <!-- 1. Make the connection -->
    <xsl:variable name="products"
                  select="sql:new('org.enhydra.instantdb.jdbc.idbDriver',
                                'jdbc:idb:D:\instantdb\Examples\sample.prp')"/>
    <HTML>
      <HEAD>
      </HEAD>
      <BODY>
        <TABLE border="1">
        <!--2. Execute the query -->
        <xsl:variable name="table" select='sql:query($products, $query)'/>
          <TR>
          <!-- Get column-label attribute from each column-header-->
          <xsl:for-each select="$table/sql/metadata/column-header">
            <TH><xsl:value-of select="@column-label"/></TH>
          </xsl:for-each>
          </TR>
          <xsl:apply-templates select="$table/sql/row-set/row"/>
          <xsl:text>&#10;</xsl:text>
        </TABLE>
      </BODY>
    </HTML> 
    <!-- 3. Close the connection -->
    <xsl:value-of select="sql:close($products)"/>
  </xsl:template>

  <xsl:template match="row">
        <TR>
          <xsl:apply-templates select="col"/>
        </TR>
  </xsl:template>

  <xsl:template match="col">
    <TD>
      <!-- Here is the column data -->
      <xsl:value-of select="text()"/>
    </TD>
  </xsl:template>

</xsl:stylesheet>
org.apache.xalan.processor Xalan Processor Package.

Parses an XSLT stylesheet document (which may include and import other stylesheet documents) and produces a StylesheetRoot (a TRaX Templates object).

StylesheetProcessor implements the TRaX {@link javax.xml.transform.TransformerFactory} interface, as well as the {@link javax.xml.transform.sax.SAXTransformerFactory} interface. It registers the {@link org.apache.xalan.processor.StylesheetHandler} object (a TrAX {@link javax.xml.transform.sax.TemplatesHandler} implementation) as the SAX ContentHandler for an XMLReader, and uses the XMLReader to parse the stylesheet document.

Before parsing the XSLT input, StylesheetHandler assembles an {@link org.apache.xalan.processor.XSLTSchema}, which uses {@link org.apache.xalan.processor.XSLTElementDef} and {@link org.apache.xalan.processor.XSLTAttributeDef} objects to recursively define the elements and attributes that an XSLT stylesheet may contain. The StylesheetHandler then passes on each parse event to the {@link org.apache.xalan.processor.XSLTElementProcessor} which the XSLTElementDef assigned to the element associated with that event.

org.apache.xalan.res Xalan resource Package.

Contains strings that require internationalization.

org.apache.xalan.serialize
org.apache.xalan.templates Xalan Templates Package.

Implements the {@link javax.xml.transform.Templates} interface, and defines a set of classes that represent an XSLT stylesheet.

{@link org.apache.xalan.templates.StylesheetRoot} implements the {@link javax.xml.transform.Templates} interface, and extends {@link org.apache.xalan.templates.StylesheetComposed}, which is a {@link org.apache.xalan.templates.Stylesheet} composed of itself and its included Stylesheet objects. A StylesheetRoot also contains a global list of all imported StylesheetComposed objects. The role of these objects is to hold immutable stylesheet data, not to perform procedural tasks associated with the construction of the data (the org.apache.xalan.processor package) or with the transformation (the org.apache.xalan.transformer package).

{@link org.apache.xalan.templates.ElemTemplateElement} is the superclass of all XSLT instruction elements, including Stylesheet. The xFunc classes extend members of the org.apache.xpath package and implement XSLT functions. Unlike the Stylesheet "container" objects, the instruction element and function classes do contain procedural execute() methods that are called during the transformation.

org.apache.xalan.trace Xalan Trace (debugger) Package.

Implementation of Xalan Trace events, for use by a debugger.

org.apache.xalan.transformer Xalan Transformer Package.

In charge of run-time transformations and the production of result trees.

{@link org.apache.xalan.transformer.TransformerImpl} implements the {@link javax.xml.transform.Transformer} interface, and is the core representation of the transformation execution.

For each node in the XML source, TransformerImpl uses the StylesheetRoot and underlying XSLT schema to determine which template to apply: one of the templates in the StylesheetRoot, a default template rule as specified in the XSLT spec, or none.

The Transformer works with {@link org.apache.xml.serializer.SerializationHandler} to forward the SAX-like events produced by the transformation to the appropriate output ContentHandler.

To the degree possible, the parsing of the XML source and application of the Templates object to that source are performed concurrently in separate threads. When necessary, the Transformer waits for the parse events that must be in place before a given template may be applied.

org.apache.xalan.xslt Xalan command-line interface.

Implementation of Xalan command-line interface.

org.apache.xalan.xsltc
org.apache.xalan.xsltc.cmdline
org.apache.xalan.xsltc.cmdline.getopt
org.apache.xalan.xsltc.compiler
org.apache.xalan.xsltc.compiler.util
org.apache.xalan.xsltc.dom
org.apache.xalan.xsltc.runtime
org.apache.xalan.xsltc.runtime.output
org.apache.xalan.xsltc.trax
org.apache.xalan.xsltc.util
org.apache.xml.dtm
org.apache.xml.dtm.ref
org.apache.xml.dtm.ref.dom2dtm
org.apache.xml.dtm.ref.sax2dtm
org.apache.xml.res
org.apache.xml.serializer Xalan Serializer Package.

Processes SAX events into streams.

The {@link org.apache.xml.serializer.SerializerFactory} is used to create a {@link org.apache.xml.serializer.Serializer} from a set of output properties (see {@link javax.xml.transform.OutputKeys}).

{@link org.apache.xml.serializer.ToStream} acts as the main baseclass for the Xalan serializer implementations. {@link org.apache.xml.serializer.ToHTMLStream} derives from this to implement HTML serialization. {@link org.apache.xml.serializer.ToTextStream} implements plain text serialization. {@link org.apache.xml.serializer.ToXMLStream} implements XML serialization.

XML mapping from characters to entity references is defined in XMLEntities.res. HTML entity reference mapping is defined in HTMLEntities.res.

Encoding information is defined in {@link org.apache.xml.serializer.Encodings}.

org.apache.xml.serializer.utils
org.apache.xml.utils Xalan utilities.

Implementation of Xalan utility classes. This package is also shared by XPath. There *should* be no outward dependencies to XPath or Xalan by classes in this package.

org.apache.xml.utils.res
org.apache.xpath XPath support Package.

Implementation of XPath; for the most part, only classes meant for public use are found at this root level of the XPath packages.

org.apache.xpath.axes XPath LocationPath support.

Implementation of XPath LocationPath support -- primary classes are LocPathIterator and UnionPathIterator.

org.apache.xpath.compiler XPath parsing and compilation support Package.

Implements an XPath parser which produces an OpMap, and a so-called Compiler which produces an expression tree for fast evaluation.

org.apache.xpath.domapi XPath domapi Package.

Implements DOM Level 3 XPath API

org.apache.xpath.functions XPath functions Package.

Implements XPath functions -- each function is derived from Function, FunctionOneArg, Function2Args, etc, with number-of-arguments checking being applied mainly at compile time -- this package only implements XPath functions, XSLT functions are found in the "templates" package.

org.apache.xpath.jaxp
org.apache.xpath.objects XPath objects Package.

Implementation of XPath polymorphic type objects -- this package will grow as XPath objects are expanded to support XML Schema data types.

org.apache.xpath.operations Xalan XPath operations.

Support for XPath operations, such as +, -, string(), etc.

org.apache.xpath.patterns XPath nodetest and XSLT pattern matching support.

Implementation of XPath nodeTest support, and XSLT pattern matching support.

org.apache.xpath.res XPath resources.

Contains strings for XPath support that require internationalization.

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.