how do you get Xalan to validate stylesheets?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 10
- Joined: Sat Jan 15, 2005 12:12 am
how do you get Xalan to validate stylesheets?
Hi,
This is not really a question about how to use Oxygen, but rather a "how did you do that?" question.
We are using Xalan for XSLT transformation in another environment, namely, within Cocoon. When we feed it stylesheets that have structural errors in them, Xalan sometimes does not complain but merely generates incorrect output. Or it gives an error message that bears no apparent relationship to the actual mistake in the stylesheet. Saxon does a better job. For example, if the stylesheet contains an <xsl:choose> that has a <debug> child element, Xalan (under Cocoon) gives an irrelevant error message, but Saxon gives a helpful one.
However, in Oxygen, when I validate the aforementioned stylesheet (Shift+Ctrl+V) using Xalan, it gives a pertinent error message similar to Saxon's. So my question is, how did you do that? Do you have to pass parameters to Xalan, or call a particular class?
(It's possible that the difference is that I'm using an older version of Xalan under Cocoon. But I don't think so. In any case, knowing how you got Xalan to validate a stylesheet in Oxygen would help me solve this problem.)
Thanks,
Lars
This is not really a question about how to use Oxygen, but rather a "how did you do that?" question.
We are using Xalan for XSLT transformation in another environment, namely, within Cocoon. When we feed it stylesheets that have structural errors in them, Xalan sometimes does not complain but merely generates incorrect output. Or it gives an error message that bears no apparent relationship to the actual mistake in the stylesheet. Saxon does a better job. For example, if the stylesheet contains an <xsl:choose> that has a <debug> child element, Xalan (under Cocoon) gives an irrelevant error message, but Saxon gives a helpful one.
However, in Oxygen, when I validate the aforementioned stylesheet (Shift+Ctrl+V) using Xalan, it gives a pertinent error message similar to Saxon's. So my question is, how did you do that? Do you have to pass parameters to Xalan, or call a particular class?
(It's possible that the difference is that I'm using an older version of Xalan under Cocoon. But I don't think so. In any case, knowing how you got Xalan to validate a stylesheet in Oxygen would help me solve this problem.)
Thanks,
Lars
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Lars,
At David Sewell's suggestion I just created a new forum for exactly this kind of questions.
For validation we perform two actions. First is to check that the stylehseet document is an well formed XML document. Then the validation is performed by trying to create a Transformer object from the stylesheet document. Make sure you register an ErrorListener on the TransformerFactory. If that does not give you the expected errors try also updating your Xalan to a newer version. We are using 2.5.1 as we found it to be more stable than 2.6.0.
Best Regards,
George
At David Sewell's suggestion I just created a new forum for exactly this kind of questions.
For validation we perform two actions. First is to check that the stylehseet document is an well formed XML document. Then the validation is performed by trying to create a Transformer object from the stylesheet document. Make sure you register an ErrorListener on the TransformerFactory. If that does not give you the expected errors try also updating your Xalan to a newer version. We are using 2.5.1 as we found it to be more stable than 2.6.0.
Best Regards,
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service