From: Norman Walsh Date: Sun, 10 Mar 2002 22:30:17 +0000 (+0000) Subject: Support the new generate.id.attributes parameter to prevent generating both div ID... X-Git-Tag: release/1.79.1~6^2~5884 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f5ee3db2df76712b0688b94d948388e1ce540bd;p=docbook-dsssl Support the new generate.id.attributes parameter to prevent generating both div ID and a NAME attributes --- diff --git a/xsl/html/component.xsl b/xsl/html/component.xsl index f1eea4c3c..a7ca1a413 100644 --- a/xsl/html/component.xsl +++ b/xsl/html/component.xsl @@ -81,6 +81,12 @@
+ + + + + + @@ -96,6 +102,12 @@
+ + + + + + @@ -130,6 +142,12 @@
+ + + + + + @@ -164,6 +182,12 @@
+ + + + + + @@ -176,6 +200,12 @@
+ + + + + + @@ -279,6 +309,12 @@
+ + + + + + diff --git a/xsl/html/division.xsl b/xsl/html/division.xsl index fa9a7138b..a648ad9fa 100644 --- a/xsl/html/division.xsl +++ b/xsl/html/division.xsl @@ -16,6 +16,12 @@
+ + + + + + @@ -33,6 +39,12 @@
+ + + + + + @@ -51,6 +63,12 @@
+ + + + + + @@ -75,6 +93,12 @@
+ + + + + + diff --git a/xsl/html/glossary.xsl b/xsl/html/glossary.xsl index c83c7fa4e..135722996 100644 --- a/xsl/html/glossary.xsl +++ b/xsl/html/glossary.xsl @@ -15,9 +15,13 @@ - +
+ + + + + -
@@ -215,7 +219,6 @@ GlossEntry ::= - @@ -226,7 +229,13 @@ GlossEntry ::= -
+
+ + + + + + diff --git a/xsl/html/index.xsl b/xsl/html/index.xsl index 53a0df60b..879aab848 100644 --- a/xsl/html/index.xsl +++ b/xsl/html/index.xsl @@ -23,6 +23,12 @@
+ + + + + + @@ -56,6 +62,12 @@
+ + + + + +
diff --git a/xsl/html/param.ent b/xsl/html/param.ent index 311881d14..81a08f1be 100644 --- a/xsl/html/param.ent +++ b/xsl/html/param.ent @@ -45,6 +45,7 @@ + diff --git a/xsl/html/param.xweb b/xsl/html/param.xweb index f5379c8a3..818f58078 100644 --- a/xsl/html/param.xweb +++ b/xsl/html/param.xweb @@ -151,6 +151,7 @@ to be incomplete. Don't forget to read the source, too :-) &make.valid.html; &html.cleanup; &draft.watermark.image; +&generate.id.attributes; XSLT Processing @@ -360,6 +361,7 @@ around all these parameters. + diff --git a/xsl/params/generate.id.attributes.xml b/xsl/params/generate.id.attributes.xml new file mode 100644 index 000000000..6c638dca7 --- /dev/null +++ b/xsl/params/generate.id.attributes.xml @@ -0,0 +1,54 @@ + + +generate.id.attributes + + + +generate.id.attributes + + + + + + + + + +Description + +If non-zero, the HTML stylesheet will generate ID attributes on +containers. For example, the markup: + +Some Title +Some para. +]]> + +might produce: + + +

Some Title

+

Some para.

+
]]> + +The alternative is to generate anchors: + + +

Some Title

+

Some para.

+
]]> + +Because the name attribute of +the a element and the id +attribute of other tags are both of type ID, producing both +generates invalid documents. + +As of version 1.50, you can use this switch to control which type of +identifier is generated. For backwards-compatibility, generating +a anchors is preferred. + +Note: at present, this switch is incompletely implemented. +Disabling ID attributes will suppress them, but enabling ID attributes +will not suppress the anchors. + + +