Hello Flavio,

while playing with that I lost the focus ...
But here is my XSL:

---8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<--
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
  <xsl:output method="xml" indent="no" doctype-system="document-v11.dtd"
              doctype-public="-//APACHE//DTD Documentation V1.1//EN" encoding="UTF-8"/>

  <xsl:template match="taglib">
    <document>
      <header>
        <title>TITLE: <xsl:value-of select="short-name"/> </title>
      </header>
      <body>
          <xsl:value-of select="description"/>,

          <section><title>Tag overview</title>
          <p> </p>
          <table>
          <tr>
              <th>Name</th>
              <th>Body-Content</th>
              <th>Description</th>
              <th>Attributes</th>
          </tr>
          <xsl:apply-templates/>
          </table>
          </section>
      </body>
    </document>
  </xsl:template>

  <xsl:template match="tag">
      <tr>
          <td> <xsl:value-of select="name" /> </td>
          <td> <xsl:value-of select="body-content" /> </td>
          <td> <xsl:value-of select="description" /> </td>
          <td> <xsl:apply-templates/> </td>
      </tr>
  </xsl:template>

  <xsl:template match="tag/attribute">
      <li> <xsl:value-of select="name"/>
           <xsl:if test="required"> (required) </xsl:if> </li>
  </xsl:template>

  <xsl:template match="*|@*"/>

</xsl:stylesheet>
---8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<--



Tested with the TLD-1.2 of Cruisecontrol it gave me



---8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<--
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document><header><title>TITLE: cruisecontrol</title></header><body>,
          <section><title>Tag overview</title><p/><table><tr><th>Name</th><th>Body-Content</th><th>Description</th><th>Attributes</th></tr>

  <tr><td>xsl</td><td>JSP</td><td>
        Transforms the xml build log using XSL.
    </td><td>
    <li>xslFile (required) </li>
  </td></tr>
  <tr><td>currentbuildstatus</td><td>JSP</td><td>
        Report when the build started, or when it will start again.
    </td><td>
  </td></tr>
  <tr><td>nav</td><td>JSP</td><td>
        Builds the navigation
    </td><td>
    <li>dateFormat (required) </li>
  </td></tr>
</table></section></body></document>
---8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<--


I haven´t tried to include that into Forrest. But maybe you can go further from here.


Jan Matčrne


> -----Ursprüngliche Nachricht-----
> Von: Flavio Tordini [mailto:flaviotordini@tin.it]
> Gesendet am: Dienstag, 29. April 2003 11:49
> An: forrest-dev@xml.apache.org
> Betreff: problem adding tld document type
>
> hi all,
> forrest is a wonderful tool, but i'm having a problem generating
> documentation for a tld file. i added this to sitemap.xmap:
>
> <!-- TLD support (FT) -->
>         <map:match pattern="body-taglib.xml">
>           <map:generate src="content/xdocs/taglib.xml"/>
>           <map:transform
> src="resources/stylesheets/tld2document.xsl"/>
>           <map:call resource="skinit">
>             <map:parameter name="type" value="document2html"/>
>             <map:parameter name="path" value="taglib.xml"/>
>           </map:call>
>         </map:match>
>
> i created the a basic xsl and added an item in site.xml.
> but the xsl seem not to work.
>
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>   <xsl:output method="xml" indent="no"
> doctype-system="document-v11.dtd"
> doctype-public="-//APACHE//DTD Documentation V1.1//EN"
> encoding="UTF-8"/>
>   <xsl:template match="/">
>     <document>
>       <header>
>         <title>TITLE: <xsl:value-of
> select="taglib/short-name"/></title>
>       </header>
>       <body>BODY: <xsl:value-of
> select="taglib/description"/>, TAGNAME:
> <xsl:value-of select="name(child::*)"/></body>
>     </document>
>   </xsl:template>
> </xsl:stylesheet>
>
> on the generated HTML i see:
> TITLE:
> BODY: , TAGNAME: taglib
>
> curiosly the xpath name() function works while all other value-of tags
> return a blank string.
>
> ANY SUGGESTIONS??? am i missing something?
>
>
> flavio
>
>