Subject: Re: [xsl] xsl From: "CyberSpace Industries 2000 Inc." <csi2000@xxxxxxxxxxxxxxx> Date: Wed, 3 May 2006 11:29:08 -0400 |
/(root) | soap:Element | soap:body | Idresponse | IDresult | ------------------------| UserID Username | | text( ) 'hello' text( ) 'there'
Cheers...Hugh CyberSpace Industries 2000 Inc. XML Training and Consulting
Hi all,
I haven't got much experience with XML and I just came across a code, like the one below, which uses 'soap: Envelope' to encapsulate data.
My problem is in getting the xsl file to display that info. At the moment with the xsl code below I can extract some information, but its dsisplayed in one string or line, rather than assigned to a html table cell. Any suggestions would be appreciated. Thanks J
Regards,
Indira
-----------xml-------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="response.xsl"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<IdResponse
xmlns="http://kkkk.com/DDiii">
<IdResult>
<UserId>hello</UserId>
<Username>there</Username>
</IdResult>
</IdResponse>
</soap:Body>
</soap:Envelope>
-----------------------------------------------------------------
--------------------xsl------------------------------------------
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://directdebit.com/DDLog"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
version="1.0">
<xsl:template match="soap:Envelope/soap:Body/IdResponse/IdResult">
<HTML>
<BODY>
<table BORDER="0" align="center" width="750px" height="70px" bgcolor="#ffffff">
<TR >
<TD colspan="5" width="47%" height="20px">
<span > User Id: </span>
<xsl:value-of select="LogonAndGetLogByAuthenticationIdResponse/LogonAndGetLogByAuthent icationIdResult/UserId"/>
</TD>
</TR>
<TR >
<TD colspan="5" width="47%" height="20px">
<span> User name: </span>
<xsl:value-of select="LogonAndGetLogByAuthenticationIdResponse/LogonAndGetLogByAuthent icationIdResult/Username "/>
</TD>
</TR>
</table>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
------output I get----------------------------
hellothere
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl, Jon Gorman | Thread | RE: [xsl] xsl, Michael Kay |
Re: [xsl] xsl, Jon Gorman | Date | RE: [xsl] xsl, Michael Kay |
Month |