Project

Profile

Help

Bug #6407

closed

Tree Model option -tree seems to be ignored for initial source documents

Added by Adrian Bird 7 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Command Line
Sprint/Milestone:
-
Start date:
2024-04-29
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

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

Commands.txt (561 Bytes) Commands.txt commands used to generate the output Adrian Bird, 2024-04-29 14:10
TreeModelTest.xslt (484 Bytes) TreeModelTest.xslt simple stylesheet Adrian Bird, 2024-04-29 14:10
TreeModelTest_linked.txt (632 Bytes) TreeModelTest_linked.txt output from -t -tree:linked Adrian Bird, 2024-04-29 14:10
TreeModelTest_tiny.txt (672 Bytes) TreeModelTest_tiny.txt output from -t -tree:tiny Adrian Bird, 2024-04-29 14:10
TreeModelTest_tinyc.txt (682 Bytes) TreeModelTest_tinyc.txt output from -t -tree:tinyc Adrian Bird, 2024-04-29 14:10
TreeModelTestData.xml (79 Bytes) TreeModelTestData.xml simple source file Adrian Bird, 2024-04-29 14:10

Please register to edit this issue

Also available in: Atom PDF