From: Norman Walsh Date: Fri, 27 Dec 2002 15:52:44 +0000 (+0000) Subject: Make sure the default namespace gets output if appropriate, but also be more selectiv... X-Git-Tag: release/1.79.1~6^2~5047 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4ed24c927465ba093833b3dd0e4ea5c17f33e2f;p=docbook-dsssl Make sure the default namespace gets output if appropriate, but also be more selective in the namespace nodes output in documentation --- diff --git a/litprog/weave.xweb b/litprog/weave.xweb index 6ea2d0a48..6b692ba6e 100644 --- a/litprog/weave.xweb +++ b/litprog/weave.xweb @@ -691,7 +691,9 @@ like an attribute in the result. The applicable namespaces are determined by walking recursively over the list of namespace nodes associated with an element. -For each namespace node, if it has a prefix that is in the list +For each namespace node, if it's already on some ancestor, then it doesn't +have to be output again, otherwise +if it has a prefix that is in the list of excluded prefixes or if it is the Literate Programming namespace, it is not counted (because it will not be output). Otherwise, it is counted. @@ -708,35 +710,102 @@ returned. select="'http://nwalsh.com/xmlns/litprog/fragment'"/> + + + + + + + + - + + - + - - + + + + + +
+Matching Namespaces + +Returns 1 if the specified namespace occurs on the context element or some +ancestor of the context element, up to but not including src:fragment +element. + +Testing for this condition in copying applicable namespaces +avoids duplicating namespace declarations repeatedly in a given +fragment. By not including the src:fragment elment +(or any of its ancestors) in the search, we can make sure that each +fragment will have a complete set of declarations. + + + + + + + + + + + 0 + + + 0 + + 1 + + + + + + + + + + + + + + + + + + + + + +
+
Output Applicable Attributes and Pseudo-Attributes @@ -783,34 +852,45 @@ been exhausted. select="'http://nwalsh.com/xmlns/litprog/fragment'"/> + + + + + + + + - - - xmlns - : - - =" - - " + + - + + + xmlns + : + + =" + + " - + @@ -998,11 +1078,13 @@ around this problem by explicitly testing for that namespace and not copying it. - - - - - + + + + + + +