From: Bob Stayton Date: Mon, 24 Oct 2011 05:45:34 +0000 (+0000) Subject: New param to support replacing generate-id() with xsl:number X-Git-Tag: release/1.79.1~6^2~638 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74735098e1a8107d139483d055412444f104d8ad;p=docbook-dsssl New param to support replacing generate-id() with xsl:number for more consistent id values. --- diff --git a/xsl/params/generate.consistent.ids.xml b/xsl/params/generate.consistent.ids.xml new file mode 100644 index 000000000..249cb8c46 --- /dev/null +++ b/xsl/params/generate.consistent.ids.xml @@ -0,0 +1,53 @@ + + +generate.consistent.ids +boolean + + +generate.consistent.ids +Generate consistent id values if document is unchanged + + + + + + + + +Description + +When the stylesheet assigns an id value to an output element, +the generate-id() function may be used. That function may not +produce consistent values between runs. Version control +systems may misidentify the changing id values as changes +to the document. + +If you set this parameter's value to 1, then the +template named object.id will replace +the use of the function generate-id() with +<xsl:number level="multiple" count="*"/>. +This counts preceding elements to generate a unique number for +the id value. + + +This param does not associate permanent unique id values +with particular elements. +The id values are consistent only as long as the document +structure does not change. +If the document structure changes, then the counting +of elements changes, and all id values after +the first such change may be different, even when there is +no change to the element itself or its output. + + + +The default value of this parameter is zero, so generate-id() is used +by default. + + +