This is a multi-part message in MIME format.
Bill,
I've been working a bit on that issue.
My conclusion is that it is not easy to fix...
The main reason is that if we want to fix that validation error, that means
the javascript content should be generated as PCDATA content:
<script type="text/javascript"><![CDATA[
...
]]</script>
But then the file should really be served as xhtml (application/xhtml+xml)
instead as html for the javascript to be interpreted...
And this is a real nightmare to make it cross-browser compatible...
(I've attached the modified stylesheet if ever you're interested in).
Another 'easy' solution would be to put the javascript in an external js
file (but I prefer to have a single html file with no external dependency).
Note that there are some other validation errors the xslt generates some
invalid tag ids: some ids are generated using the class names which may
contain '$' when the bug instance refers to a inner class. The xslt should
be modified in order to replace $ by (for example) underscores in tag ids.
I may work on these issues, but not before the 2nd or 3rd week of January.
Note they are also some bug descriptions that generate invalid html. For
example, HE_EQUALS_USE_HASHCODE description is invalid: the tag 'pre' cannot
be put as a child of 'p':
...
<p><pre>public int hashCode() {
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}</pre></p>
Happy holidays!
Etienne
> -----Original Message-----
> From: findbugs-discuss-bounces@xxxxxxxxxx
> [mailto:findbugs-discuss-bounces@xxxxxxxxxx] On Behalf Of
> Etienne Giraudy
> Sent: mardi 26 décembre 2006 09:23
> To: 'Bill Pugh'; findbugs-discuss@xxxxxxxxxx
> Subject: RE: [FB-Discuss] Having trouble validating output of
> using fancy.xsl
>
> Bill,
>
> The issue is about the javascript embeded in the HTML.
> As the generated HTML is xhtml, the inline javascript should
> be declared as
> #PCDATA content (see http://www.w3.org/TR/xhtml1/#h-4.8).
>
> I'll have a look to this later this week.
> (in the xsl, the javascript is already embeded in #PCDATA
> content, so this
> is probably just a small tweak to fix this).
>
> Cheers,
> Etienne
>
>
> > -----Original Message-----
> > From: findbugs-discuss-bounces@xxxxxxxxxx
> > [mailto:findbugs-discuss-bounces@xxxxxxxxxx] On Behalf Of Bill Pugh
> > Sent: mardi 26 décembre 2006 05:49
> > To: Etienne Giraudy; findbugs-discuss@xxxxxxxxxx
> > Subject: [FB-Discuss] Having trouble validating output of
> > using fancy.xsl
> >
> > I've now added an ant task to build.xml that both makes
> sure the ant
> > task runs,
> > and also generates findbugs report using fancy.xsl and tries to
> > validate the resulting
> > html file.
> >
> > You can just do
> > ant validatefancy
> >
> > to get this. It uses the ant task to analyze findbugs.jar, and
> > generates lib/findbugs.html.
> >
> > I'm now getting a validation error:
> >
> > validatefancy:
> > [xmlvalidate] /Users/pugh/Documents/eclipse/workspace/findbugs/lib/
> > findbugs.html:71:249: The entity name must immediately follow
> > the '&'
> > in the entity reference.
> >
> >
> > and I have no idea how to begin to correct the validation
> problems,
> > or even know
> > if I am doing the validation correctly.
> >
> > Can anyone help?
> >
> > Bill
> >
> >
> >
> > On Dec 21, 2006, at 9:52 PM, William Pugh wrote:
> >
> > > Update of /cvsroot/findbugs/findbugs/src/xsl
> > > In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv3253/src/xsl
> > >
> > > Modified Files:
> > > fancy.xsl
> > > Log Message:
> > > Updates from subversion repository
> > >
> > > Index: fancy.xsl
> > >
> ===================================================================
> > > RCS file: /cvsroot/findbugs/findbugs/src/xsl/fancy.xsl,v
> > > retrieving revision 1.8
> > > retrieving revision 1.9
> > > diff -u -d -r1.8 -r1.9
> > > --- fancy.xsl 17 Dec 2006 03:45:49 -0000 1.8
> > > +++ fancy.xsl 22 Dec 2006 04:52:41 -0000 1.9
> > > @@ -329,7 +329,7 @@
> > > <!-- bug descriptions - hidden -->
> > > <xsl:for-each select="/BugCollection/BugInstance">
> > > <div style="display:none;">
> > > - <xsl:attribute name="id">b-uid-<xsl:value-of
> > > select="@uid" /></xsl:attribute>
> > > + <xsl:attribute name="id">b-uid-<xsl:value-of
> > > select="@instanceHash" />-<xsl:value-of
> > > select="@instanceOccurrenceNum" /></xsl:attribute>
> > > <xsl:for-each select="*/Message">
> > > <div class="b-r"><xsl:apply-templates /></div>
> > > </xsl:for-each>
> > > @@ -340,7 +340,7 @@
> > > </xsl:for-each>
> > > </div>
> > > <div id='fixedbox'>
> > > - <div id='bug-placeholder'>...</div>
> > > + <div id='bug-placeholder'></div>
> > > </div>
> > > </body>
> > > </html>
> > > @@ -479,7 +479,7 @@
> > > <div class="bb">
> > > <a>
> > > <xsl:attribute name="href"></xsl:attribute>
> > > - <xsl:attribute
> name="onclick">showbug('b-uid-<xsl:value-
> > > of select="@uid" />','<xsl:value-of select="$which-list" /
> > > >');return false;</xsl:attribute>
> > > + <xsl:attribute
> name="onclick">showbug('b-uid-<xsl:value-
> > > of select="@instanceHash" />-<xsl:value-of
> > > select="@instanceOccurrenceNum" />','<xsl:value-of
> select="$which-
> > > list" />');return false;</xsl:attribute>
> > > <span>
> > > <xsl:attribute name="class">b-<xsl:value-of
> > > select="@priority"/></xsl:attribute>
> > >   
> > > @@ -487,7 +487,7 @@
> > > <span class="b-t"><xsl:value-of select="@abbrev" />: </
> > > span> <xsl:value-of select="Class/Message" />
> > > </a>
> > > <div style="display:none;">
> > > - <xsl:attribute name="id">b-uid-<xsl:value-of
> > > select="@uid" />-ph-<xsl:value-of select="$which-list" /></
> > > xsl:attribute>
> > > + <xsl:attribute name="id">b-uid-<xsl:value-of
> > > select="@instanceHash" />-<xsl:value-of
> > > select="@instanceOccurrenceNum" />-ph-<xsl:value-of
> select="$which-
> > > list" /></xsl:attribute>
> > > loading...
> > > </div>
> > > </div>
> > > @@ -627,10 +627,11 @@
> > > <div style="display:none;">
> > > <xsl:attribute name="id">category-<xsl:value-of
> > > select="$category" />-and-code-<xsl:value-of
> select="$code" />-and-
> > > bug-<xsl:value-of select="$bug" /></xsl:attribute>
> > > <xsl:variable
> > name="cat-code-type">category-<xsl:value-of
> > > select="$category" />-and-code-<xsl:value-of
> select="$code" />-and-
> > > bug-<xsl:value-of select="$bug" /></xsl:variable>
> > > + <xsl:variable name="bug-id">b-uid-<xsl:value-of
> > > select="@instanceHash" />-<xsl:value-of
> > > select="@instanceOccurrenceNum" /></xsl:variable>
> > > <xsl:for-each select="/BugCollection/BugInstance
> > > [@category=$category and @abbrev=$code and @type=$bug]">
> > > <xsl:call-template name="display-bug">
> > > <xsl:with-param name="b-t" select="@type" />
> > > - <xsl:with-param name="bug-id"
> select="@uid" />
> > > + <xsl:with-param name="bug-id" select="$bug-
> > > id" />
> > > <xsl:with-param name="which-list"
> select="'c'" />
> > > </xsl:call-template>
> > > </xsl:for-each>
> > > @@ -794,10 +795,11 @@
> > > <div style="display:none;">
> > > <xsl:attribute name="id">package-<xsl:value-of
> > > select="$package" />-and-class-<xsl:value-of
> > select="$class" />-and-
> > > type-<xsl:value-of select="$type" /></xsl:attribute>
> > > <xsl:variable name="package-class-type">package-
> > > <xsl:value-of select="$package" />-and-class-<xsl:value-of
> > > select="$class" />-and-type-<xsl:value-of select="$type" /></
> > > xsl:variable>
> > > + <xsl:variable name="bug-id">b-uid-<xsl:value-of
> > > select="@instanceHash" />-<xsl:value-of
> > > select="@instanceOccurrenceNum" /></xsl:variable>
> > > <xsl:for-each select="/BugCollection/BugInstance[@type=
> > > $type and Class[position()=1 and @classname=$class]]">
> > > <xsl:call-template name="display-bug">
> > > <xsl:with-param name="b-t" select="@type" />
> > > - <xsl:with-param name="bug-id"
> select="@uid" />
> > > + <xsl:with-param name="bug-id" select="$bug-
> > > id" />
> > > <xsl:with-param name="which-list"
> select="'p'" />
> > > </xsl:call-template>
> > > </xsl:for-each>
> > > @@ -806,5 +808,3 @@
> > > </xsl:template>
> > >
> > > </xsl:transform>
> > > -
> > > -
> > >
> > >
> > >
> > --------------------------------------------------------------
> > --------
> > > ---
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the
> chance to
> > > share your
> > > opinions on IT & business topics through brief surveys -
> > and earn cash
> > > http://www.techsay.com/default.php?
> > > page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Findbugs-commit mailing list
> > > Findbugs-commit@xxxxxxxxxxxxxxxxxxxxx
> > > https://lists.sourceforge.net/lists/listinfo/findbugs-commit
> >
> > _______________________________________________
> > Findbugs-discuss mailing list
> > Findbugs-discuss@xxxxxxxxxxxxxxxxxx
> > http://mailman.cs.umd.edu/mailman/listinfo/findbugs-discuss
> >
>
>
> _______________________________________________
> Findbugs-discuss mailing list
> Findbugs-discuss@xxxxxxxxxxxxxxxxxx
> http://mailman.cs.umd.edu/mailman/listinfo/findbugs-discuss
>
fancy-new.xsl
Description: Text Data
|