[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] about impoting and applying Templates
Subject: [xsl] about impoting and applying Templates From: "gbk" <gbk@xxxxxxxxxxxxxx> Date: 30 Jan 2002 21:24:34 -0000 |
hello Gurus i have a xml file something like this <Models> <CommentContainer> <publicCommentNodes> <commentHolder> <publicCommentNodes> <publicCommentNodes> <commentHolder> </commentContainer> <model> when I am applying my XSL to this xml i want my output exactly the way its in xml. For commentHolder I have a separate XSL and I have imported that XSL in current XSL(PublicComments) as shown below. When i say applyTemplates the output is it first DIsplays all "PublicCommnets" and then displays "CommentHolders" But I want the output in sequence which is in xmlFile Can i get some Information for this problem Thanks Gbk 'THIS IS MY XSL FILE <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:import href="forCommentHolder.xsl"/> <xsl:output method="html"/> <xsl:template match="/"> <html> <body> <font face="ARIAL" SIZE="5"> <center> <b>PUBLIC COMMENTS</b> </center> <br/> <xsl:apply-templates select="//publicCommentNodes"/> <xsl:apply-templates select="//commentHolder/WMSForwardMessage"/> </font> </body> </html> </xsl:template> <xsl:template match="publicCommentNodes"> <xsl:variable name="Subject"> <xsl:value-of select="commentSubject"/> </xsl:variable> <xsl:variable name="Date"> <xsl:value-of select="translate(originated,'T','/')"/> </xsl:variable> <xsl:variable name="FromName"> <xsl:value-of select="concat(publicCommentFrom/lastName,', ',publicCommentFrom/firstName)"/> </xsl:variable> <xsl:variable name="OrgName"> <xsl:value-of select="publicCommentFrom/organizationUnit/objectName"/> </xsl:variable> <xsl:variable name="CommentText"> <xsl:value-of select="commentText"/> </xsl:variable> <table border="0" cellpadding="2" cellspacing="2"> <tr> <td colspan="3"> <b> <xsl:value-of selec "$Subject"/> </b> </td> <td> <xsl:value-of select="$Date"/> </td> </tr> <tr> <td colspan="2"> <b>From:</b> </td> <td colspan="2"> <xsl:value-of select="$FromName"/> </td> </tr> <tr> <td colspan="2"> <b>Comment:</b> </td> <td colspan="2"> <xsl:value-of select="$CommentText"/> </td> </tr> <tr> <td colspan="2"> <b>Attachments:</b> </td> <td colspan="2"> <table border="0" cellpadding="2" cellspacing="2"> <xsl:for-each select="attachmentBinder/Document"> <tr> <td> <xsl:value-of select="concat(revisions/versions/userFileName,' ',translate(revisions/versions/uploadDate,'T','/'), ' ',revisions/versions/fileSize )"/> </td> </tr> </xsl:for-each> </table> </td> </tr> </table> <br/> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Javascript inside XSL(Jus, Gertjan Assies | Thread | Re: [xsl] about impoting and applyi, Joerg Heinicke |
Re: [xsl] Javascript inside XSL(Jus, Thomas B. Passin | Date | Re: [xsl] RE: Re: Converting the fl, Joerg Heinicke |
Month |