Bug #3012
closedIn browser, do not always produce HTML elements in result documents when they should be produced
100%
Description
There are some cases when HTML elements should be constructed, but they are not.
-
When using the transform method destination:"replaceBody"|"appendToBody"|"prependToBody" to add the principal output to the HTML body (as pointed out in https://saxonica.plan.io/boards/5/topics/6589?r=6590#message-6590).
-
When an HTML fragment is generated using xsl:result-document, HTML elements are not produced by xsl:sequence (but they are produced by xsl:copy-of).
Updated by Debbie Lockett about 8 years ago
- Subject changed from In browser, do always produce HTML elements in result documents when they should be produced to In browser, do not always produce HTML elements in result documents when they should be produced
Updated by Debbie Lockett about 8 years ago
When building result trees, elements should always be created using the Context.createElement method (in transform.js). This uses the createElement (or createElementNS) method of the JavaScript Document interface. As long as the document (context.resultDocument) that this method is called on is an HTML document, HTML elements will be produced. So we need to ensure that context.resultDocument is an HTML document in the required cases.
Changes to applyStylesheet method in transform.js:
-
To set context.resultDocument to window.document when using one of the destination options.
-
To ensure that the context is passed as the 3rd arg in the Expr.makeComplexContent call, so that context.resultDocument can be accessed correctly.
Updated by Debbie Lockett about 8 years ago
- Status changed from New to In Progress
Various unit tests created for this bug (in combination with https://saxonica.plan.io/issues/2944) for the JS unit testing framework in development.
Further tests still required.
Updated by Debbie Lockett about 8 years ago
- Status changed from In Progress to Resolved
Now marking this as resolved, as more tests have been added, and have not found further issues.
Updated by Debbie Lockett almost 8 years ago
- Fixed in version set to 0.9.1
Bug fix applied in the Saxon-JS 0.9.1 beta release.
Updated by Debbie Lockett almost 8 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
Bug fix applied in the Saxon-JS 0.9.1 beta release.
Updated by Community Admin over 7 years ago
- Fixed in JS Release set to Saxon-JS 0.9.1
- Applies to JS Branch 0.9 added
- Fix Committed on JS Branch 0.9 added
Please register to edit this issue
Also available in: Atom PDF Tracking page