Bug #6588
closedcanonicalization property not working
0%
Description
The canonicalization property is not working in SaxonC via the API.
For example the The saxon:canonical='yes' property is not being found.
options such as: executable.set_property('!canonical', 'yes')
for the python API fails too.
The user should be able to set the saxon:canonical in the stylesheet as a workaround:
<xsl:output method='xml' saxon:canonical='yes' />
Updated by O'Neil Delpratt 9 days ago
- Status changed from New to Rejected
The canonical feature is supported on SaxonC. Users have to use the EQname for the additional serialization parameters:. For example in C++:
Xslt30Processor *trans = processor->newXslt30Processor();
XsltExecutable *executable = nullptr;
try {
executable = trans->compileFromFile("test.xsl");
} catch (SaxonApiException &e) {
}
executable->setProperty("!{http://saxon.sf.net/}canonical", "yes");
Notice the exclamation in the property is used to indicate and serialisation properties and you have to use the EQName for the names coming from the Saxon namespace.
See the SaxonC documentation page on setting serialisation properties here:
https://www.saxonica.com/saxon-c/documentation12/index.html#!configuration/xslt
Also see the general serialisation parameters here: https://www.saxonica.com/documentation12/index.html#!extensions/output-extras
Additional ones are given here: https://www.saxonica.com/documentation12/index.html#!extensions/output-extras/serialization-parameters
Please register to edit this issue