Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tough one
Message
De
19/02/2003 11:09:09
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
XML
Titre:
Divers
Thread ID:
00754683
Message ID:
00754964
Vues:
15
Hi Paul,

Thanks for the response. What is the best way to write the XML file from within the web app?

Jim

>>All,
>>
>> I want to create a report using XSLT and XML though I don't know if this is possible or not. The report will be for a project management web app. I want to have a task header displayed and any subtasks or task details below it, and then proceed with the next task header and so on (see sample below). Is there a way to do this if I write the xml file correctly or would it be easier to use a reporting package like Crystal reports? The reason I am looking for a different way to do this is because I have had problems displaying the report.
>
>Yeah, that should be easy enough to do with XML/XSL. Your XML might look like this (I'm sure there are a dozen other ways to do this):
>
>
><?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
><list>
>  <topic title="Create home web page">
>     <subtopics>
>        <description>Add colorful background.</description>
>     </subtopics>
>     <subtopics>
>        <description>Add login control.</description>
>     </subtopics>
>  </topic>
>  <topic title="Create Guest Book Page">
>     <subtopics>
>       <description>Add ability for user to do such and such</description>
>     </subtopics>
>  </topic>
></list>
>
>
>Then, your XSL would look like:
>
>
><xsl:stylesheet version="1.0"
>                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                xmlns="http://www.w3.org/TR/xhtml1/strict">
><xsl:template match="/">
><html>
><body>
>    <TABLE WIDTH="100%">
>
>    <xsl:for-each select="list/topic">
>      <TR>
>        <TD style="color: #081D84; font-weight: bold; "><xsl:value-of select="@title"/></TD>
>      </TR>
>
>    <xsl:for-each select="subtopics">
>      <TR>
>        <TD>
>          <TABLE>
>            <TR>
>               <TD><xsl:value-of select="description"/></TD>
>            </TR>
>          </TABLE>
>        </TD>
>      </TR>
>    </xsl:for-each>
>    </xsl:for-each>
>
>    </TABLE>
></body>
></html>
></xsl:template>
></xsl:stylesheet>
>
>
>I didn't get fancy with the HTML, but hopefully that helps get you started.
Thanks

Jim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform