Project

Profile

Help

Feature #4051

Updated by Michael Kay over 5 years ago

 
 **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. 

Back