[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

XML question!

From: Res Pons <pons32_at_hotmail.com>
Date: 2006-01-29 21:28:05 CET

Hi

Last week, thanks to your help I figured out how to pull an xml report out
of Subversion. The log looks basic as follows:

-----------------xml file/log----------------------------
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="rev.xsl"?> **********# I have to
figure out a way to echo or insert this line into each xml log from now on

<log>
<logentry
   revision="24414">
<author>steven</author>
<date>2006-01-26T10:26:07.131774Z</date>
<msg>product-build788</msg>
</logentry>
<logentry
   revision="24413">
<author>paultran</author>
<date>2006-01-26T10:17:21.297463Z</date>
<msg>Anthill: Increment build number</msg>
</logentry>
<logentry
   revision="24410">
<author>joesantini</author>
<date>2006-01-26T05:03:43.737577Z</date>
<msg>Cleaned up event data model for new advrpt process</msg>
</logentry>
.
.
.
</log>
-----------------------------

I wrote an xsl (style sheet) to create a report as follows:

--------------------.xsl file--------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

  <html>
    <body>
      <h2>Company Name</h2>
      <table border="1">

        <tr bgcolor="#9acd32">
          <th align="left">REVISION</th>
          <th align="left">AUTHOR</th>
          <th align="left">DATE</th>
          <th align="left">MSG</th>
        </tr>

        <xsl:for-each select="log/logentry">

        <tr>
          <td><xsl:value-of select="//@revision"/></td>
          <td><xsl:value-of select="author"/></td>
          <td><xsl:value-of select="date"/></td>

<xsl:choose>
  <xsl:when test="msg = 'product-build788'"> ****************************
            <td bgcolor="#ff00ff">
            <xsl:value-of select="msg"/></td>

  </xsl:when>
  <xsl:otherwise>

          <td><xsl:value-of select="msg"/></td>

  </xsl:otherwise>
</xsl:choose>

        </tr>

        </xsl:for-each>

      </table>
    </body>
  </html>
</xsl:template></xsl:stylesheet>

-----------------------end of xsl file-----------------------

*
QUESTION: In the xsl file where I have marked it with *'s, if I look for the
whole string exactly 'product-build788' it works but does anyone know how I
can pass wildcards in the 'when' node, like 'product-build*' since the build
numbers will alway change?

Thanks

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Jan 29 21:29:18 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.