Default attributes from DTD during XSLT transformation
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 24
- Joined: Thu Apr 27, 2006 5:39 pm
Default attributes from DTD during XSLT transformation
When an XML document declares the DTD associated with it using the DOCTYPE declaration, I want to be able to transform the document with XSLT (2.0, so I'm using Saxon) in such a way that the DTD is ignored when the document is parsed prior to transformation, because I don't want the default attributes from the DTD coming into play. It's not obvious to me how to do this. In the Oxygen preferences, under XML / XSLT-FO-XQuery / XSLT / Saxon / Saxon-HE/PE/EE, I have already turned off (unchecked) this option: DTD based validation of the source file ("-v"). It seems like that should do the trick, but it doesn't.
Is the XSLT processor required to read the DTD and bring in the default attributes even if validation of source is turned off?
If so, is there a way around this, other than to remove the DOCTYPE declaration altogether?
I suppose this is a Saxon question more than an Oxygen one, but nonetheless I'd appreciate any suggestions.
Is the XSLT processor required to read the DTD and bring in the default attributes even if validation of source is turned off?
If so, is there a way around this, other than to remove the DOCTYPE declaration altogether?
I suppose this is a Saxon question more than an Oxygen one, but nonetheless I'd appreciate any suggestions.
-
- Posts: 24
- Joined: Thu Apr 27, 2006 5:39 pm
Re: Default attributes from DTD during XSLT transformation
Never mind. I figured out that I can do this using a Saxon config file, like so:
The config file format is detailed here:
http://www.saxonica.com/documentation/i ... -file.html
- In the Configure Transformation Scenario dialog, edit your transformation scenario
- For "Transformer", choose Saxon PE or EE, then click the little gear icon to open the advanced options dialog
- Check "Use a configuration file" and enter the path to a config file such as this:
Code: Select all
<configuration xmlns="http://saxon.sf.net/ns/configuration" edition="EE">
<global expandAttributeDefaults="false"/>
</configuration>
http://www.saxonica.com/documentation/i ... -file.html
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Default attributes from DTD during XSLT transformation
Hi,
Apologies for resurrecting an old thread, I just wanted to mention an alternative solution in case anyone else encounters this.
Starting with Oxygen v14.2 you can easily prevent this by setting an option in the Saxon-HE/PE/EE Advanced options (cogwheel button icon) from the transformation scenario configuration or directly in the XSLT debugger.
Disable the option: Expand attribute defaults ("-expand").
If you want to disable this globally in Oxygen, you can find the same option in: Options > Preferences, XML > XSLT/FO/XQuery > XSLT > Saxon > Saxon HE/PE/EE.
Regards,
Adrian
Apologies for resurrecting an old thread, I just wanted to mention an alternative solution in case anyone else encounters this.
Starting with Oxygen v14.2 you can easily prevent this by setting an option in the Saxon-HE/PE/EE Advanced options (cogwheel button icon) from the transformation scenario configuration or directly in the XSLT debugger.
Disable the option: Expand attribute defaults ("-expand").
If you want to disable this globally in Oxygen, you can find the same option in: Options > Preferences, XML > XSLT/FO/XQuery > XSLT > Saxon > Saxon HE/PE/EE.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 14
- Joined: Tue Jan 19, 2016 5:55 pm
Re: Default attributes from DTD during XSLT transformation
We found the expand setting for DTDs, but how about default attributes used in XSD schemas. Is there a way to control their expansion before XSLT transformations?
Thx!
Thx!
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Default attributes from DTD during XSLT transformation
Hi,
It's the same option that controls the expansion of default attributes from either DTD or XML schema (XSD).
Note that only Saxon-EE is schema aware. For Saxon-PE/HE this option won't make any difference with XML schema (default attributes will not be expanded).
What version and build of Oxygen are you using (Help > About)?
Regards,
Adrian
It's the same option that controls the expansion of default attributes from either DTD or XML schema (XSD).
Note that only Saxon-EE is schema aware. For Saxon-PE/HE this option won't make any difference with XML schema (default attributes will not be expanded).
What version and build of Oxygen are you using (Help > About)?
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
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