Bug #6407
closedTree Model option -tree seems to be ignored for initial source documents
100%
Description
I have been looking at the different tree models that can be defined in Saxon and seem to have come across a problem.
The command line documentation, https://www.saxonica.com/documentation12/index.html#!using-xsl/commandline, says: -tree:(linked|tiny|tinyc) Selects the implementation of the internal tree model: tiny selects the "tiny tree" model (the default), linked selects the linked tree model, tinyc selects the "condensed tiny tree" model. See Choosing a tree model.
I have tried all 3 tree models and the output, with -t, shows that for all 3 values the tiny tree, net.sf.saxon.tree.tiny.TinyBuilder, is used when reading the source document. When I read the same document via doc(base-uri()) then the trace shows the tree I chose being used.
I've attached some files:
TreeModelTestData.xml - very simple source file
TreeModelTest.xslt - my simple stylesheet that reads the source document again
Commands.txt - a copy of the commands I ran (I couldn't see any way of getting Saxon to output the parameters it was using)
TreeModelTest_tiny.txt - the output from -t -tree:tiny. You will see the tiny tree is used both times which is what I expect.
TreeModelTest_linked.txt - the output from -t -tree:linked. You will see the tiny tree is used first and then the linked tree when the source file is read again.
TreeModelTest_tinyc.txt - the output from -t -tree:tinyc. You will see the tiny tree is used first and then the tinyc tree when the source file is read again.
As a minor comment there is an error on the Choosing a tree model page, https://www.saxonica.com/documentation12/index.html#!sourcedocs/tree-models/choosingmodel - it has -tree:condensed but it should be -tree:tinyc.
Adrian
Files
Please register to edit this issue