Preventing the insertion of default DTD attributes
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 7
- Joined: Wed Jul 26, 2023 7:45 pm
Preventing the insertion of default DTD attributes
Hello,
Some time back, I created a javascript plugin that uses the Saxon 6 parser to convert from one for of XML to another.
We recently discovered that this is inserting unwanted default attributes.
Is there a way to suppress this? I found the setting for HE/SE/PE, but not for 6.
Some time back, I created a javascript plugin that uses the Saxon 6 parser to convert from one for of XML to another.
We recently discovered that this is inserting unwanted default attributes.
Is there a way to suppress this? I found the setting for HE/SE/PE, but not for 6.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Preventing the insertion of default DTD attributes
Hi,
Saxon 6 is a no longer maintained XSLT processor, if its documentation does not contain details about not expanding attribute values then that's that, there may be some XSLT user lists somewhere, I think Michael Kay the developer of both Saxon 6 and 12 is active on Stack overflow if you want to ask there and get an answer from him.
Other than that why not use Saxon HE or remove the DOCTYPE declaration from the XML before processing and then add it back afterwards?
Regards,
Radu
Saxon 6 is a no longer maintained XSLT processor, if its documentation does not contain details about not expanding attribute values then that's that, there may be some XSLT user lists somewhere, I think Michael Kay the developer of both Saxon 6 and 12 is active on Stack overflow if you want to ask there and get an answer from him.
Other than that why not use Saxon HE or remove the DOCTYPE declaration from the XML before processing and then add it back afterwards?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 7
- Joined: Wed Jul 26, 2023 7:45 pm
Re: Preventing the insertion of default DTD attributes
I tried changing the transformer, and my test didn't work. I see an error of this form:
Engine name: Saxon-PE 12.5
Severity: error
Problem ID: SXCH0004
Description: Cannot create user-supplied output method. Failed to load required class
URL: http://www.saxonica.com/html/documentat ... l#SXCH0004
But I have been unable to determine what that means.
Engine name: Saxon-PE 12.5
Severity: error
Problem ID: SXCH0004
Description: Cannot create user-supplied output method. Failed to load required class
URL: http://www.saxonica.com/html/documentat ... l#SXCH0004
But I have been unable to determine what that means.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Preventing the insertion of default DTD attributes
Hi,
Maybe you can pick a supported xsl:output method value from the Saxon 12 documentation:
https://www.saxonica.com/html/documenta ... utput.html
Regards,
Radu
Maybe you can pick a supported xsl:output method value from the Saxon 12 documentation:
https://www.saxonica.com/html/documenta ... utput.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 7
- Joined: Wed Jul 26, 2023 7:45 pm
Re: Preventing the insertion of default DTD attributes
Changing it to xml worked, but now the JavaScript plugin doesn't like the TRANSFORMER_SAXON_ENTERPRISE_EDITION value.Radu wrote: ↑Thu Feb 13, 2025 7:49 am Hi,
Maybe you can pick a supported xsl:output method value from the Saxon 12 documentation:
https://www.saxonica.com/html/documenta ... utput.html
Regards,
Radu
Has the API changed?
Code: Select all
var transformer = pluginWorkspaceAccess.getXMLUtilAccess().createXSLTTransformer(
new Packages.javax.xml.transform.stream.StreamSource(jsDirURL + "/generalize.xsl"),
null,
Packages.ro.sync.exml.workspace.api.util.XMLUtilAccess.TRANSFORMER_SAXON_ENTERPRISE_EDITION, true);
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Preventing the insertion of default DTD attributes
Hi Mario,
It would help if you could post the exact error you get.
The Javadoc of the Enterprise edition constant says something like:
So please use in the JS code "Packages.ro.sync.exml.workspace.api.util.XMLUtilAccess.TRANSFORMER_SAXON_HOME_EDITION" instead.
Regards,
Radu
It would help if you could post the exact error you get.
The Javadoc of the Enterprise edition constant says something like:
Code: Select all
/**
* Saxon 9 Enterprise Edition transformer type (full extensions support + schema aware).<br>
*
* @deprecated Since Oxygen 23 you can no longer create Saxon 9 PE transformers using this constant.
* The created transformer will be a Saxon HE transformer instead.
*/
@Deprecated
@SuppressWarnings("java:S1133")
final int TRANSFORMER_SAXON_ENTERPRISE_EDITION = 4;
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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