[4suite-checkins] In 4Suite/Ft/Data, files sdocbook_html.xslt

Mike Brown mbrown at 4suite.org
Tue Dec 5 17:28:26 MST 2006


Modified Files:
    sdocbook_html.xslt

Log Message:
remove id attr from named anchor at start of each section div

ViewCVS diff:
  http://cvs.4suite.org/viewcvs/4Suite/Ft/Data/sdocbook_html.xslt.diff?r1=1.23&r2=1.24
ViewCVS view:
  http://cvs.4suite.org/viewcvs/4Suite/Ft/Data/sdocbook_html.xslt?rev=1.24&content-type=text/vnd.viewcvs-markup

Index: sdocbook_html.xslt
===================================================================
RCS file: /var/local/cvsroot/4Suite/Ft/Data/sdocbook_html.xslt,v
retrieving revision 1.23
retrieving revision 1.24
diff -U2 -r1.23 -r1.24
--- sdocbook_html.xslt	22 Aug 2006 00:38:31 -0000	1.23
+++ sdocbook_html.xslt	6 Dec 2006 00:28:25 -0000	1.24
@@ -7,5 +7,5 @@
  (for Simplified DocBook V1.0CR2)
 
- Copyright 2002 Fourthought Inc, USA.
+ Copyright 2006 Fourthought Inc, USA.
  See  http://4suite.org/COPYRIGHT  for license and copyright information
 
@@ -24,4 +24,6 @@
   - Do as much natural traversal down the source tree as possible.
   - Special traversal modes:
+      VALIDATE
+         ensure the content model is followed
       HTMLHEAD
          use to generate HTML <head> contents
@@ -57,5 +59,4 @@
       part because (for now) we are letting the built-in template
       for text nodes handle text, copying it through.
-  - It's already starting to get messy, I know.
 -->
 <xsl:stylesheet
@@ -526,8 +527,18 @@
       </xsl:variable>
 
+      <!--
+        A named anchor must be provided for browsers that don't support
+        URL fragments referencing div IDs.  In HTML, anchor names share the same
+        value space as element IDs in HTML, and must be unique across that space.
+        This makes it impossible to validly provide both an anchor and a div with
+        the same identifier. However, since the uniqueness of IDs can be (and is,
+        on the W3C's validation service) validated with a DTD, while uniqueness
+        the whole value space cannot, we'll punt: the div gets an 'id' and the
+        anchor gets a 'name' with the same value, even though that's improper.
+      -->
       <xsl:variable name="section-id">
         <xsl:call-template name="section-id"/>
       </xsl:variable>
-      <a name="{$section-id}" id="{$section-id}"/>
+      <a name="{$section-id}"/>
 
       <div>


More information about the 4suite-checkins mailing list