Project

Profile

Help

Feature #4051

closed

Documentation namespace in XSLT

Added by Michael Kay over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Saxon extensions
Sprint/Milestone:
-
Start date:
2018-11-26
Due date:
% Done:

0%

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

Description

FINAL OUTCOME: PROPOSAL NOT IMPLEMENTED

It is common practice in serious XSLT programming to put documentation comments in elements/attributes using a namespace dedicated to this purpose. For example, the XSLTdoc tool uses xmlns:xd="http://www.pnp-software.com/XSLTdoc"

Unfortunately this namespace "leaks" into the semantics of the XSLT code, even at runtime. Even with exclude-result-prefixes, a namespace declared in the stylesheet needs to be retained in the static context accessible at execution time in case it is used, for example, when casting a dynamically-constructed string to a QName. This also means that it needs to appear in exported SEF files, cluttering up the file and reducing performance.

There might be a case for an attribute saxon:exclude-namespaces which is stronger in its effect than exclude-result-prefixes: it should mean that the namespace binding is available only for resolving element and attribute names appearing literally in the stylesheet, and not for resolving QNames-in-content, either at compile time or at run time. This means it would not clutter up SEF files.

Please register to edit this issue

Also available in: Atom PDF