From 74735098e1a8107d139483d055412444f104d8ad Mon Sep 17 00:00:00 2001 From: Bob Stayton Date: Mon, 24 Oct 2011 05:45:34 +0000 Subject: [PATCH] New param to support replacing generate-id() with xsl:number for more consistent id values. --- xsl/params/generate.consistent.ids.xml | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 xsl/params/generate.consistent.ids.xml 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. + + + -- 2.40.0