package.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <html>
  2. <body>
  3. <h1>GNU JAXP XSL transformer</h1>
  4. <div>
  5. This package contains a Java XSL transformer compliant with the JAXP
  6. specification. It depends on the GNU DOM and XPath implementations, and
  7. will generate GNU DOM nodes unless a specific target from another
  8. implementation was given. It understands DOM, SAX, and stream sources
  9. and result sinks and supports these JAXP features.
  10. </div>
  11. <div>
  12. To use this transformer, set the system property
  13. <code>javax.xml.transform.TransformerFactory</code> to the value
  14. <code>gnu.xml.transform.TransformerFactoryImpl</code>. You can then
  15. instantiate <a href='TransformerFactory.html'>TransformerFactory</a>
  16. and transformers in the ordinary manner. Reuse of stylesheets is
  17. supported using the JAXP <a href='Templates.html'>Templates</a>
  18. mechanism.
  19. </div>
  20. <h3>Architecture</h3>
  21. <div>
  22. When given a stylesheet source, this implementation compiles it internally
  23. into a Stylesheet object, which is a container for templates and state.
  24. Each stylesheet instruction is represented by a subclass of TemplateNode,
  25. which is arranged in a directed graph: each TemplateNode has a reference
  26. to its first child and the next node.
  27. </div>
  28. <div>
  29. The transformation process consists of identifying the Template that matches
  30. the root of the source context, and calling <code>apply</code> on its
  31. corresponding TemplateNode. This in turn processes its children and next
  32. TemplateNode, depending on the semantics of each node type.
  33. </div>
  34. <div>
  35. Template nodes may reference XPath expressions or patterns. These are fully
  36. compiled to objects of type <a href='../xpath/Expr.html'>Expr</a> at the
  37. time the stylesheet is compiled.
  38. </div>
  39. <h3>Conformance</h3>
  40. <div>
  41. This implementation is feature complete, but the XSLT specification is
  42. large and there are still many bugs that need to be ironed out. It has
  43. been tested against the OASIS XSLT TC test suite, comprising unit tests
  44. from the Xalan project and Microsoft. Conformance to these unit tests
  45. is approximately 70% at the current time, although normal usage of the
  46. transformer should involve relatively few surprises (the test suite is
  47. designed to test very complex and obscure functionality).
  48. </div>
  49. <h3>Known bugs</h3>
  50. <ul>
  51. <li>When reusing stylesheets using the JAXP Templates mechanism, XSL
  52. <code>apply-imports</code> instructions will not work.</li>
  53. <li>XPath filter expressions do not always work as expected (this is a
  54. problem with the GNU XPath implementation rather than the transformer).
  55. This can result in problems with the <code>position()</code> function,
  56. as well as <code>select</code> expressions and numbering.</li>
  57. </ul>
  58. <div>
  59. Obviously we'd like to improve conformance and fix these bugs. If you're
  60. interested in working on any of these issues please
  61. <a href='mailto:classpathx-xml@gnu.org'>contact us</a>.
  62. </div>
  63. </body>
  64. </html>