Project

Profile

Help

Bug #4446

closed

Schema-Aware Transformation: wrong node set

Added by Frank Steimke almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Schema-Aware processing
Sprint/Milestone:
-
Start date:
2020-01-29
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

Hi, i have a medium-sized project dealing with latin characters in Unicode. There is a database of latin characters (latinchars.xml), which is a XML Document valid with respect to an XML 1.1 schema latinchars.xsd. There is a schema-aware function library in XSLT 3. The overall goal is th produce a docbook documentation, which works fine. All this is done as an Oxygen project. Oxygen version is 21.1 (recent) which includes Saxon EE 8.8.0.1 on Windows 10.

However, we want to analyze some aspects of NFD normalization. For this i added an extension Element in the schema, which allows xs:any childs. While reading the document from the database, we add an extension element with an nfd element as child. the nfd Element has an mandatory base element as child, followed by an optional diacritical element. The enriched document is validated against the schema without any error.

When i appy transformations to this document, there is a strange behaviour, which seems to be a bug. Unfortunately, i am unable to reproduce it with a small script. I can only describe what is see, and give you the project attached.

Observation:

The enriched database is hold in a global variable $characterSet as='document-node(schema-element(lc:characterSet))'. There are 924 child Elements of Type (*, Entry). Each of these has an nfd child element, every nfd element has an bas child element. Counting the nfd/base elements, i would expect 924 nodes.

This expression gives the correct result:

xsl:value-of select="count($characterSet//element(*, Entry)/extension/nfd/base)"/>

This expression, however, gives the incorrect number of 1 node only:

<xsl:value-of select="count($characterSet//nfd/base)"/>

So, when i count the number of nfd/base descendats of $characterset i get only one, but when i count the number of element(*, Entry)/extension/nfd/base) descendants, i get 924.

I have tried to boil it down to a simple script, but failed. So i have attached the whole oxygen projekt. The transformation which counts the number of nodes is called xsl/dia-matrix.xsl

Sincerely, Frank


Files

latinchars.zip (1.31 MB) latinchars.zip Oxygen project. xsl/dia-matrix.xsl counts nodes Frank Steimke, 2020-01-29 11:08
dia-matrix.xsl (2.18 KB) dia-matrix.xsl Frank Steimke, 2020-01-30 09:38
issue-4446.zip (5.23 KB) issue-4446.zip Frank Steimke, 2020-02-01 09:11
2020-02-02-issue-4446.zip (31.5 KB) 2020-02-02-issue-4446.zip Frank Steimke, 2020-02-02 09:49

Please register to edit this issue

Also available in: Atom PDF