EDN Admin
Well-known member
Hello everyone,<br/> <br/> I have an XSL Transform that I am using in a Win Forms application that is currently not working as I expect it to. I have included the XML (top) and XSL (bottom).<br/> <br/> XML: <br/> <br/>
<div style="color:Black;background-color:White
<pre><span style="color:Blue <
<span style="color:#a31515 Request
<span style="color:Red xmlns
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue http://www.cingular.com/xs/DispatchServletRequest.xs
<span style="color:Black "
<span style="color:Red requestType
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue UP
<span style="color:Black "
<span style="color:Red productType
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue phone
<span style="color:Black "
<span style="color:Red retrieveCart
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue false
<span style="color:Black "
<span style="color:Red loggedInUsersCTN
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue 1121121122
<span style="color:Black "
<span style="color:Blue >
<span style="color:Blue <?
<span style="color:#a31515 xml-stylesheet
<span style="color:Gray type="text/xsl sample transform.xsl"
<span style="color:Blue ?>
<span style="color:Blue <
<span style="color:#a31515 AccountInfo
<span style="color:Red totalLinesOnFTGroup
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue 3
<span style="color:Black "
<span style="color:Blue >
<span style="color:Blue <
<span style="color:#a31515 ExistingAccountInfo
<span style="color:Blue >
<span style="color:Blue <
<span style="color:#a31515 ExistingSSN
<span style="color:Blue >
111111111<span style="color:Blue </
<span style="color:#a31515 ExistingSSN
<span style="color:Blue >
<span style="color:Blue <
<span style="color:#a31515 ExistingBillingAccountNumber
<span style="color:Blue >
08951013<span style="color:Blue </
<span style="color:#a31515 ExistingBillingAccountNumber
<span style="color:Blue >
<span style="color:Blue </
<span style="color:#a31515 ExistingAccountInfo
<span style="color:Blue >
<span style="color:Blue </
<span style="color:#a31515 AccountInfo
<span style="color:Blue >
<span style="color:Blue </
<span style="color:#a31515 Request
<span style="color:Blue >
[/code]
<br/> XSL: <br/> <br/>
<pre><?xml version="1.0" encoding="iso-8859-1"?>
<!-- Edited by XMLSpy -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform
<xsl:template match="/
<html>
<body>
<!--Account Information-->
Account Info - Existing Account Info
<table border="1
<tr bgcolor="#9acd32
<th>Existing SSN</th>
<th>Billing Account Number</th>
</tr>
<xsl:for-each select="Request/AccountInfo/ExistingAccountInfo
<tr>
<td>
<xsl:value-of select="/ExistingSSN"/>
</td>
<td>
<xsl:value-of select="/ExistingBillingAccountNumber"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>[/code]
As you can see - and this is a very edited-down code snippet - I am attempting to extract and display the SSN and Account Number. However, when I apply the transform, the browser pane on my form is not rendering the information; only the headers for SSN and Account Number.<br/> <br/> Thoughts/suggestions?<br/> <br/> Thanks,<br/> <br/> Brian
View the full article
<div style="color:Black;background-color:White
<pre><span style="color:Blue <
<span style="color:#a31515 Request
<span style="color:Red xmlns
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue http://www.cingular.com/xs/DispatchServletRequest.xs
<span style="color:Black "
<span style="color:Red requestType
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue UP
<span style="color:Black "
<span style="color:Red productType
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue phone
<span style="color:Black "
<span style="color:Red retrieveCart
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue false
<span style="color:Black "
<span style="color:Red loggedInUsersCTN
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue 1121121122
<span style="color:Black "
<span style="color:Blue >
<span style="color:Blue <?
<span style="color:#a31515 xml-stylesheet
<span style="color:Gray type="text/xsl sample transform.xsl"
<span style="color:Blue ?>
<span style="color:Blue <
<span style="color:#a31515 AccountInfo
<span style="color:Red totalLinesOnFTGroup
<span style="color:Blue =
<span style="color:Black "
<span style="color:Blue 3
<span style="color:Black "
<span style="color:Blue >
<span style="color:Blue <
<span style="color:#a31515 ExistingAccountInfo
<span style="color:Blue >
<span style="color:Blue <
<span style="color:#a31515 ExistingSSN
<span style="color:Blue >
111111111<span style="color:Blue </
<span style="color:#a31515 ExistingSSN
<span style="color:Blue >
<span style="color:Blue <
<span style="color:#a31515 ExistingBillingAccountNumber
<span style="color:Blue >
08951013<span style="color:Blue </
<span style="color:#a31515 ExistingBillingAccountNumber
<span style="color:Blue >
<span style="color:Blue </
<span style="color:#a31515 ExistingAccountInfo
<span style="color:Blue >
<span style="color:Blue </
<span style="color:#a31515 AccountInfo
<span style="color:Blue >
<span style="color:Blue </
<span style="color:#a31515 Request
<span style="color:Blue >
[/code]
<br/> XSL: <br/> <br/>
<pre><?xml version="1.0" encoding="iso-8859-1"?>
<!-- Edited by XMLSpy -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform
<xsl:template match="/
<html>
<body>
<!--Account Information-->
Account Info - Existing Account Info
<table border="1
<tr bgcolor="#9acd32
<th>Existing SSN</th>
<th>Billing Account Number</th>
</tr>
<xsl:for-each select="Request/AccountInfo/ExistingAccountInfo
<tr>
<td>
<xsl:value-of select="/ExistingSSN"/>
</td>
<td>
<xsl:value-of select="/ExistingBillingAccountNumber"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>[/code]
As you can see - and this is a very edited-down code snippet - I am attempting to extract and display the SSN and Account Number. However, when I apply the transform, the browser pane on my form is not rendering the information; only the headers for SSN and Account Number.<br/> <br/> Thoughts/suggestions?<br/> <br/> Thanks,<br/> <br/> Brian
View the full article