[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

about impoting and applying Templates

Subject: about impoting and applying Templates
From: "gbk" <gbk@xxxxxxxxxxxxxx>
Date: 30 Jan 2002 21:24:34 -0000
impoting
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.