html5/spec-author-view patch.anolis,1.6,1.7 style.css,1.9,1.10

Update of /sources/public/html5/spec-author-view
In directory hutz:/tmp/cvs-serv18136

Modified Files:
	patch.anolis style.css 
Log Message:
per suggestion from Hixie, changed how defining instances of terms are indicated in the Index of terms (they are now listed in document order along with the instances that refer to them, but shown in bold)


Index: patch.anolis
===================================================================
RCS file: /sources/public/html5/spec-author-view/patch.anolis,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- patch.anolis	19 Aug 2010 22:24:01 -0000	1.6
+++ patch.anolis	20 Aug 2010 04:24:20 -0000	1.7
@@ -1,6 +1,6 @@
 diff -r 16550726fd0d anolis
 --- a/anolis	Sun Aug 30 16:53:19 2009 -0500
-+++ b/anolis	Fri Aug 20 03:49:06 2010 +0900
++++ b/anolis	Fri Aug 20 13:11:54 2010 +0900
 @@ -70,10 +70,10 @@
  
  def getOptParser():
@@ -16,7 +16,7 @@
  
 diff -r 16550726fd0d anolislib/processes/filter.py
 --- a/anolislib/processes/filter.py	Sun Aug 30 16:53:19 2009 -0500
-+++ b/anolislib/processes/filter.py	Fri Aug 20 03:49:06 2010 +0900
++++ b/anolislib/processes/filter.py	Fri Aug 20 13:11:54 2010 +0900
 @@ -5,23 +5,4 @@
          return
      selector = cssselect.CSSSelector(kwargs["filter"])
@@ -44,8 +44,8 @@
 +        element.drop_tree()
 diff -r 16550726fd0d anolislib/processes/terms.py
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/anolislib/processes/terms.py	Fri Aug 20 03:49:06 2010 +0900
-@@ -0,0 +1,332 @@
++++ b/anolislib/processes/terms.py	Fri Aug 20 13:11:54 2010 +0900
+@@ -0,0 +1,337 @@
 +# coding=UTF-8
 +# Copyright (c) 2010 Michael(tm) Smith
 +#
@@ -168,26 +168,16 @@
 +                        # otherwise, the textContent of this <dfn> is unique
 +                        # among the <dfn>s in this document, so we just use the
 +                        # textContent as the name of the term
-+                        termName.text = textContent+" "
++                        termName.text = textContent
++                    termName.tail= "\n"
 +                    indexEntry.append(termName)
-+                    # add a hyperlink back to the <dfn> that is the defining
-+                    # instance of the term
-+                    dfnHeadingLink = self.getAncestorHeadingLink(dfn, termID)
-+                    dfnHeadingLink.set(u"class","dfn-ref")
-+                    # we add a U+203b "REFERENCE MARK" character just so we can
-+                    # have an appropriate separator between the term and the
-+                    # heading link we append to it
-+                    dfnHeadingLink.text = u"\u203b "
-+                    termName.append(dfnHeadingLink)
-+                    termName.tail = "\n"
 +                    # #########################################################
 +                    # make a list of all the instances of terms in the document
 +                    # that are hyperlinked references back to the <dfn> term
-+                    # that is the defining instance of the term
++                    # that is the defining instance of this term, as well as
++                    # the <dfn> defining instance itself
 +                    # #########################################################
-+                    instanceList = ElementTree.xpath("//a[substring-after(@href,'#') = $targetID]", targetID = termID)
-+                    # if we found any instances of hyperlinked references to
-+                    # this <dfn> term, then we process the list
++                    instanceList = ElementTree.xpath("//a[substring-after(@href,'#')=$targetID]|//*[@id=$targetID]", targetID = termID)
 +                    if instanceList:
 +                        instanceItem = None
 +                        lastLinkToHeading = None
@@ -203,6 +193,8 @@
 +                            # heading for the section that contains this
 +                            # instance hyperlink
 +                            linkToHeading = self.getAncestorHeadingLink(instance, instanceID)
++                            if not instance.tag == u"a":
++                                linkToHeading.set(u"class","dfn-ref")
 +                            # if this heading is not the same as one that we've
 +                            # already added to the index entry for this term,
 +                            # then process the heading
@@ -232,6 +224,10 @@
 +                            else:
 +                                n += 1
 +                                counterLink = etree.Element(u"a",{u"href": "#"+instanceID, u"class": "index-counter"})
++                                if not instance.tag == u"a":
++                                    counterLink.set(u"class","dfn-ref")
++                                else:
++                                    counterLink.set(u"class","index-counter")
 +                                counterLink.text = "("+str(n)+")"
 +                                counterLink.tail = "\n"
 +                                instanceItem.append(counterLink)
@@ -241,11 +237,20 @@
 +                            # to add that instance now
 +                            if n == 1:
 +                                indexEntry.append(instanceItem)
-+                    # otherwise, the document contains no hyperlinked references
-+                    # to this term at all, so we just add a note to indicate that
-+                    else:
++                    # if length of instanceList isn't greater than one,
++                    # it means the <dfn> defining instance is the only one in
++                    # the list, and the document contains no hyperlinked
++                    # references to this term at all, so we add a note to
++                    # indicate that
++                    if not len(instanceList) > 1:
++                        # if we don't have more than one item in this list, it
++                        # means the <dfn> defining instance is the only item in
++                        # the list, and the document contains no hyperlinked
++                        # references back to that defining instance at all, so
++                        # we add a note to indicate that
 +                        noRefsNote = etree.Element(u"dd",{u"class": "index-norefs"})
 +                        noRefsNote.text = "No references in this file."
++                        indexEntry.set(u"class","has-norefs")
 +                        indexEntry.append(noRefsNote)
 +                    self.terms.append(indexEntry)
 +                    indexEntry.tail = "\n"

Index: style.css
===================================================================
RCS file: /sources/public/html5/spec-author-view/style.css,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- style.css	19 Aug 2010 07:51:16 -0000	1.9
+++ style.css	20 Aug 2010 04:24:20 -0000	1.10
@@ -36,13 +36,8 @@
 h1 .rcsrevision {
   color: #bbb;
 }
-a.dfn-ref {
-  display: none;
-}
-dt:hover a.dfn-ref {
-  display: inline;
-  text-decoration: none;
-  font-weight: normal;
+.dfn-ref {
+  font-weight: bold;
 }
 .index-norefs,
 .index-id {

Received on Friday, 20 August 2010 04:25:23 UTC