|
<xsl:apply-templates/> needed to be written to filter out the unwanted data:
<xsl:template match="/">
<html>
<head>
<title>CSCC09 assignment 1, phase 1</title>
</head>
<body>
<h2>List of properties:</h2>
<table>
<xsl:apply-templates select="a1/property[@type='condominium']"/>
</table>
<br/>
<h3>House</h3>
</body>
</html>
</xsl:template>
<xsl:template match="property">
<tr>
<xsl:apply-templates select="owner"/>
</tr>
</xsl:template>
<xsl:template match="owner">
<td>
<xsl:value-of select="."/>
</td>
</xsl:template>
|
|
|
|
|
how can i enable debugging in web service?
my client cannot access the service if i create it in the wwwroot\folder\service... however it can access it wwwroot\service like this can i get a logical reason for this
bu
|
|
|
|
|
I have an XML server control places in an aspx-page. The document-source is ="inhoud.xml" and the transformSource="inhoud.xslt. When I run it, it returns "'xsl' is an undeclared namespace".
What am I missing here? What do I do wrong?
A xls-newbie...
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="xsltest.aspx.vb" Inherits="StyleSheetTest.xsltest"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>xsltest</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<asp:Xml id="Xml1" runat="server" DocumentSource="inhoud.xml" TransformSource="inhoud.xslt"></asp:Xml>
</form>
</body>
</HTML>
content of inhoud.xlst:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/website">
<xsl:apply-templates select="website">
<xsl:apply-templates select="pagina">
<p><xsl:value-of select="pid"/></p>
<p><xsl:value-of select="rangnr"/></p>
<p><xsl:value-of select="titel"/></p>
<p><xsl:value-of select="inhoud"/></p>
</xsl:apply-templates>
</xsl:apply-templates>
</xsl:template>
</xsl:stylesheet>
Content of inhoud.xml:
<?xml version="1.0" encoding="utf-8" ?>
<website>
<pagina>
<pid></pid>
<rangnr></rangnr>
<titel></titel>
<inhoud></inhoud>
</pagina>
</website>
|
|
|
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
led mike
|
|
|
|
|
Sometimes I am so blind.... thanks Mike
|
|
|
|
|
Hi,
I have some webservice running on windows 2003 machine over SSL (Does not require client certificate. SSL, just to encrypt the data).
I made a client in VB6 which uses Soap Toolkit 3 to access the webservice.
Everything works fine if I use the client on windows2003 or windows XP machine. Client can deal with the webserice using "https" URL.
But, when I tired running the client over win2000 machine, it gave me following error.
---
Connector:Unspecified HTTP error. HRESULT=0x800A1518 - Client:An unanticipated error occurred during the processing of this request. HRESULT=0x800A1518 - Client:Sending the Soap message failed or no recognizable response was received HRESULT=0x800A1518 - Client:Unspecified client error. HRESULT=0x800A1518
----
Then I changed the code so that it references the webserice with "http". It worked.
Then what I figured out is..
On win2000 machine when I wrote the url with "https" in browser, I got security warning "u r about to see secure item". This warning was not seen when I wrote the URL in win2003 and XP. So, I think the Soap Toolkit can not deal with that security warning?
Can anybody tell me how to solve this?
Any help will be appreciated.
- PPT
|
|
|
|
|
Looks like you have a space just after the "<" of the "employee_db" element. XML does not support spaces there.
|
|
|
|
|
i just checked the XML file and there is no problem with the spaces.the code in file is:
<?xml version="1.0" ?> <br />
<employee_db />
now can u tell me the problem with the code???
|
|
|
|
|
No, you haven't given me enough information to diagnose your problem. Also, your original question is missing?
Now, can you give me more information and more code?
|
|
|
|
|
Hi I am tring to read a xml in vs2005
I sent a post a few days ago and was hoping to revist the problem with the small pregress I have made.
here is the vb.net code:
Dim ds As New DataSet
ds.ReadXml(xmlout)
ds.WriteXml("C:\Query.xml")
here is the xml doc i am reading:
<?xml version="1.0" encoding="Windows-1252"?>
<InvQuery Language='05' CssStyle='' DecFormat='1' DateFormat='01' Role='01' Version='6.0.015'>
etc
my code keeps raising the following exception: "illegal characters in path"
I have noticed when I remove the attributes in the below line to just:
<InvQuery>
The code executes just as it should can anyone help with this problem pleeze =)
Cheers Dom
|
|
|
|
|
Just a guess, did you try changing the SingleQuote characters delimiting attribute values to DoubleQuote characters?
led mike
|
|
|
|
|
System.IO.StreamReader sr = new System.IO.StreamReader(@"C:\Query.xml");
System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(sr);
ds.ReadXml(xtr);
ds.WriteXml("Querytest.xml");
I have done this with your XML and it works perfectly.
|
|
|
|
|
|
Hi all.
I exported an excel file with 29 coloums as a xml spreadsheet, this I want to import into my C# app.
basic structure that it I'm going to use is
<row>
<cell><Data ss:Type="Number">1</Data></cell>
<cell><Data ss:Type="String">SomeData</Data></cell>
<cell ss:Index="4"><Data ss:Type="String">MoreData</Data></cell>
</row>
No, column 3 was blank, so it gave me the Index of the next xml entry. Want I want to know is...
The attribute of the cell, is it just "Index" or is it "ss:Index" ????
Thanx in advance
-- modified at 5:47 Tuesday 3rd October, 2006
He who laughs last is a bit on the slow side
|
|
|
|
|
The "ss" of "ss:Index" is the namespace as defined in document element:
<br />
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"<br />
xmlns:o="urn:schemas-microsoft-com:office:office"<br />
xmlns:x="urn:schemas-microsoft-com:office:excel"<br />
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"<br />
xmlns:html="http://www.w3.org/TR/REC-html40"><br />
...<br />
</Workbook><br />
Also, "ss" is the default namespace of the XML document. You have to account for this namespace before you can access the "Index" attribute via a program, XPath or XSLT.
|
|
|
|
|
Thanks for the quick reply, looks like I need to first sharpen my xml knowledge (alot)
He who laughs last is a bit on the slow side
|
|
|
|
|
Hi all,
How can i set a path in the xml file and use it in the xsl style sheet?
example: the path could be "C:\image.jpg"
I want to be able to set the path in the xml file because this file gets created by our program and the user can change the path, that is why i dont want to do it as followed: <fo:external-graphic src="c:\image.jpg"/> this is a part from my xsl file but i cant use it like this any more...
thank you in advance...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Kindly help me in my peoject
#sanroop#
|
|
|
|
|
To do what, exactly?
Steve S
Developer for hire
|
|
|
|
|
Hello all,
I have an XML whick has the details regarding the function names and parameters. I'll have to display the details in a table format. The sample XML and table format required are given below:
XML Format:
<Result>
<IOParameters>
<Inputs>
<Parameter>
<ParameterName>input</ParameterName>
<Value>value</Value>
<Unit>unit</Unit>
</Parameter>
<Parameter>
<ParameterName>input</ParameterName>
<Value>value</Value>
</Parameter>
</Inputs>
<Outputs>
<Parameter>
<ParameterName>sdg</ParameterName>
<Value>sdg</Value>
<Unit>sdg</Unit>
<ToleranceHigh>sg</ToleranceHigh>
<ToleranceLow>sgd</ToleranceLow>
</Parameter>
<Parameter>
<ParameterName>sdg</ParameterName>
<Value>sdg</Value>
<ToleranceHigh>sg</ToleranceHigh>
<ToleranceLow>sgd</ToleranceLow>
</Parameter>
<Parameter>
<ParameterName>sdg</ParameterName>
<Value>sdg</Value>
<Unit>sdg</Unit>
</Parameter>
</Outputs>
</IOParameters>
<Error>
<ErrorDescription>sdg</ErrorDescription>
</Error>
</Result>
TABLE FORMAT:
__________________________________________________________________
Function Name Results
____________________________________________________
Input Name Value Unit Low High
/Output Limit Limit
___________________________________________________________________
Samp1 Output Abc 786 - - -
___________________________________________________________________
Samp2 Input Xyz 909 M 10 100
_____________________________________________________
Input Pqr 9899 X - -
_____________________________________________________
Output Zzz 8899 - - -
___________________________________________________________________
The number of input and output parameters for every function may vary.
Please help me out in generating the XSL for this XML. I had tried it out but am not able to align them properly. I want the table width to be 100% and not more than that.
Thanks in advance.
Madhu
|
|
|
|
|
I have created a web service on our server. The client created an application to send us some information in a SOAP header. We process this information and return some values back to them. This is working fine, but we wanted to capture the client's server IP address when we record our logins. Using Request.UserHostAddress will capture the IP address from the client's computer, not from the their web server. Is this possible to do? Or would they need to pass it through a SOAP Header.
|
|
|
|
|
dove11 wrote: I have created a web service on our server.
What environment are you in? In .NET you can use System.Net.XXXX to obtain the machines hostname and IP. If in C++ you can use the sockets API.
led mike
|
|
|
|
|
Hi Mike. Thanks for replying. I am using Microsoft Development Environment 2003 Version 7.1.3088, Microsoft .NET Framework 1.1 Version 1.1.4322 SP1, Microsoft Visual Basic .NET, ASP .NET.
Marcy
|
|
|
|
|
using System.Net;
System.Net.IPHostEntry hostent = Dns.GetHostEntry("localhost");
foreach (IPAddress addr in hostent.AddressList)
{
Debug.WriteLine(String.Format("{0}:{1}", addr.Address, addr.ToString()));
}
led mike
|
|
|
|
|
Thanks Mike. I will try that. The server IP address I am trying to capture is a client's. This client is using our web service. We want to allow only a certain range of IP addresses access to the web service.
Marcy
|
|
|
|