Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] formatting issues

From: ms <mina_hurray@--------->
To:
Date: 11/2/2006 2:40:00 PM
I did not post this three times, the first time it was
sent by accident even before I could modify the
values. I do apologise for this. 

--- Michael Kay <mike@xxxxxxxxxxxx> wrote:

> I scrolled down about three screenfuls of stuff that
> was obviously
> irrelevant to the problem. Then I found two
> variables v1 and v2 that are
> declared but not referenced, but I can't tell if
> that's relevant to the
> problem or not. Then I saw
> document(concat($server,'/getinfo.dox?...........),
> and I don't know what's
> in the variable $server, and if I did, I wouldn't
> know what's in the
> document that's fetched - if indeed anything is. So
> I started wondering
> exactly what your problem is, and I got to the end
> of the mail, which just
> says that your code doesn't work. I don't know what
> it's supposed to do, and
> I don't know what it actually does, so I gave up.
> Since you asked the same
> question three times, I thought I would let you know
> why I didn't answer.
> 
> Michael Kay
> http://www.saxonica.com/
> 
> 
> > -----Original Message-----
> > From: ms [mailto:mina_hurray@xxxxxxxxx] 
> > Sent: 01 November 2006 20:46
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: Re: [xsl] formatting issues
> > 
> > Hi:
> > 
> > Can someone please reply to this ? I have been
> pretyt 
> > frustrated with this problem and would really
> appreciate if 
> > anyone can help.
> > 
> > --- ms <mina_hurray@xxxxxxxxx> wrote:
> > 
> > > I have tried everything possible and have failed
> to format this XML.
> > > 
> > > My XSLT looks like this:
> > > 
> > > <xsl:template match="states">
> > > 		<br/>
> > > 		<xsl:if test="//state/sym='R'">
> > > 			<table width="100%">
> > > 				<tr>
> > > 					<td colspan="8">
> > > 						<b>STATES: </b>
> > > 					</td>
> > > 				</tr>
> > > 				<tr>
> > > 					<td width="9%">
> > > 						<u>Val1</u>
> > > 					</td>
> > > 					<td width="15%">
> > > 						<u>Val2</u>
> > > 					</td>
> > > 					<td width="7%">
> > > 						<u>Val3</u>
> > > 					</td>
> > > 					<td width="7%">
> > > 						<u>Val4</u>
> > > 					</td>
> > > 					<td width="9%">
> > > 						<u>Val5</u>
> > > 					</td>
> > > 					<td width="21%">
> > > 						<u>Val6</u>
> > > 					</td>
> > > 					<td width="15%">
> > > 						<u>Val7</u>
> > > 					</td>
> > > 					<td width="7%">
> > > 						<u>Val8</u>
> > > 					</td>
> > > 				</tr>
> > > 				<xsl:for-each select="//state">
> > > 					<xsl:choose>
> > > 						<xsl:when 
> > test="sym='R'">
> > > 							<tr>
> > > 								<td>
> > > 								
> > 	<xsl:value-of select="Val1"/>
> > > 								</td>
> > > 								<td>
> > > 								
> > 	<xsl:value-of select="Val2"/>
> > > 								</td>
> > > 								<td>
> > > 								
> > 	<xsl:choose>
> > > 									
> > > 								
> > 			<xsl:value-of select="Val3"/>
> > > 								
> > > 								</td>
> > > 								<td>
> > > 								
> > 	<xsl:value-of select="Val4"/>
> > > 								</td>
> > > 								
> > <xsl:variable name="v1">
> > > 								
> > 	<xsl:value-of select="Val1"/>
> > > 								
> > </xsl:variable>
> > > 								
> > <xsl:variable name="v2">
> > > 								
> > 	<xsl:value-of select="Val2"/>
> > > 								
> > </xsl:variable>
> > > 						
> > > 								
> > > 								
> > <xsl:apply-templates
> > >
> >
>
select="document(concat($server,'/getinfo.dox?...........)"/>
> > > 							</tr>
> > > 						</xsl:when>
> > > 					</xsl:choose>
> > > 				</xsl:for-each>
> > > 			</table>
> > > 		</xsl:if>
> > > 	</xsl:template>
> > > 	<xsl:template match="results">
> > > 		<tr>
> > > 			<xsl:apply-templates/>
> > > 		</tr>
> > > 	</xsl:template>
> > > 	<xsl:template match="data">
> > > 		<xsl:apply-templates/>
> > > 	</xsl:template>
> > > 	<xsl:template match="data/Val5">
> > > 		<td>
> > > 			<xsl:value-of select="."/>
> > > 		</td>
> > > 	</xsl:template>
> > > 	<xsl:template match="data/Val6">
> > > 		<td>
> > > 			<xsl:value-of select="node()"/>
> > > 		</td>
> > > 	</xsl:template>
> > > 	<xsl:template match="data/Val7">
> > > 		<td>
> > > 			<xsl:value-of select="node()"/>
> > > 		</td>
> > > 	</xsl:template>
> > > 	<xsl:template match="data/Val8">
> > > 		<td>
> > > 			<xsl:value-of select="node()"/>
> > > 		</td>
> > > 	</xsl:template>
> > > 
> > > 
> > > Now, Val1, Val2, Val3, Val4 are available in the
> input XML 
> > SO I am not 
> > > concerned about them becoz they format fine.
> > > 
> > > Val5, Val6, Val7, and Val8 are retrieved thru a
> server call 
> > using JSP 
> > > where it return the XML which looks like  below:
> > > 
> > > <results>
> > > 
> > > 	<data>
> > > <Val5>something</Val5>
> > > <Val6>something</Val6>
> > > <Val7>something</Val7>
> > > <Val8>P</Val8>
> > > </data>
> > > 
> > > 	<data>
> > > <Val5>something</Val5>
> > > <Val6>something</Val6>
> > > <Val7>something</Val7>
> > > <Val8>P</Val8>
> > > </data>
> > > 
> > > 	</results>
> > > 
> > > How do I format this to XHTML view. The above
> XSLT does not seem to 
> > > work on this. Thank you for all your help.
> > > 
> > > 
> > >  
> > >
> >
>
______________________________________________________________
> > ______________________
> 
=== message truncated ===



 
____________________________________________________________________________________
Get your email and see which of your friends are online - Right on the New Yahoo.com 
(http://www.yahoo.com/preview)


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent