XML, XSL

This is a discussion on "XML, XSL" within the Other Programming Languages section. This forum, and the thread "XML, XSL are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Other Programming Languages

Notices




Reply
 
LinkBack Thread Tools
  #21  
Old Apr 14th, 2004, 12:27
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,189
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Does your IUSR_ComputerName account have permissions to access that file?

Can you post your EXACT source code for both ASP, and XML giving the full directories where these files reside.

Cheers,

Rob
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #22  
Old Apr 14th, 2004, 13:34
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
they are not online... orderx.xml is in C:/Data Ben/John/Assignment

Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE catalogue [
	<!ELEMENT catalogue (product*)>
	<!ELEMENT product (name,desc,para*,url,price,spacer)>
	<!ELEMENT name		(#PCDATA)>
	<!ELEMENT desc		(#PCDATA)>
	<!ELEMENT para		(#PCDATA)>
	<!ELEMENT url		(#PCDATA)>
	<!ELEMENT price		(#PCDATA)>
	<!ELEMENT spacer	(#PCDATA)>
]>

<?xml-stylesheet type="text/xsl" href="order.xsl"?>

<catalogue>

<product>
<name>Product Name</name>
<desc>Short Desc</desc>
<para>Long paragraph one</para>
<para>Long paragraph two</para>
<url>http://www.novatech.co.uk/novatech/Silverstream/Objectstore/Images/si-novccsp13.jpg</url>
<price>Price</price>
<spacer>--</spacer>
</product>

<product>
<name>Product Name</name>
<desc>Short Desc</desc>
<para>Long paragraph one</para>
<para>Long paragraph two</para>
<url>http://www.novatech.co.uk/novatech/Silverstream/Objectstore/Images/I220442.jpg</url>
<price>Price</price>
<spacer>--</spacer>
</product>


<product>
<name>Product Name</name>
<desc>Short Desc</desc>
<para>Long paragraph one</para>
<para>Long paragraph two</para>
<url>http://www.novatech.co.uk/novatech/Silverstream/Objectstore/Images/si-novdm25b.jpg</url>
<price>Price</price>
<spacer>--</spacer>
</product>


<product>
<name>Product Name</name>
<desc>Short Desc</desc>
<para>Long paragraph one</para>
<para>Long paragraph two</para>
<url>http://www.novatech.co.uk/novatech/Silverstream/Objectstore/Images/si-apr03_Soprano.jpg</url>
<price>Price</price>
<spacer>--</spacer>
</product>


<product>
<name>Product Name</name>
<desc>Short Desc</desc>
<para>Long paragraph one</para>
<para>Long paragraph two</para>
<url>http://www.novatech.co.uk/novatech/Silverstream/Objectstore/Images/si-nbPerformer.jpg</url>
<price>Price</price>
<spacer>--</spacer>
</product>

<product>
<name>Product Name</name>
<desc>Short Desc</desc>
<para>Long paragraph one</para>
<para>Long paragraph two</para>
<url>http://www.novatech.co.uk/novatech/Silverstream/Objectstore/Images/I210554.jpg</url>
<price>Price</price>
<spacer>--</spacer>
</product>

<product>
<name>Product Name</name>
<desc>Short Desc</desc>
<para>Long paragraph one</para>
<para>Long paragraph two</para>
<url>http://www.novatech.co.uk/novatech/SilverStream/Objectstore/Images/pc123PC.jpg</url>
<price>Price</price>
<spacer>--</spacer>
</product>


<product>
<name>Product Name</name>
<desc>Short Desc</desc>
<para>Long paragraph one</para>
<para>Long paragraph two</para>
<url>http://www.novatech.co.uk/novatech/Silverstream/Objectstore/Images/si-msmmkb.jpg</url>
<price>Price</price>
<spacer>--</spacer>
</product>


<product>
<name>Product Name</name>
<desc>Short Desc</desc>
<para>Long paragraph one</para>
<para>Long paragraph two</para>
<url>http://www.novatech.co.uk/novatech/Silverstream/Objectstore/Images/si-novms.jpg</url>
<price>Price</price>
<spacer>--</spacer>
</product>


<product>
<name>Product Name</name>
<desc>Short Desc</desc>
<para>Long paragraph one</para>
<para>Long paragraph two</para>
<url>http://www.novatech.co.uk/novatech/Silverstream/Objectstore/Images/si-novmoucorv2.jpg</url>
<price>Price</price>
<spacer>--</spacer>
</product>

</catalogue>
and order.xsl is in the same directory:

Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?> 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

<html>

<head>

</head>

<body>

<form name="order" method="post" action="http://www.computing.surrey.ac.uk/cgi-bin/R.Peel/getpost.pl">

<xsl:for-each select="catalogue/product">

<table width="100%" bgcolor="#000000" cellspacing="1" cellpadding="0">

<tr height="20">

<td bgcolor="#FFFFFF" width="20%" rowspan="4" align="center" valign="middle">

<script type="text/vbscript">

set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("orderx.xml")

path="/product/url/text()"
set nodes=xmlDoc.selectNodes(path)

for each x in nodes
  document.write("[img][/img]")
next

</script>



</td>

<td bgcolor="#000055" width="80%" valign="top">

<font color="#FFFFFF">
<xsl:value-of select="name"/>
</font>

</td>

</tr>

<tr height="20">

<td bgcolor="#AAAA99" width="80%" valign="top">

<xsl:value-of select="desc"/>

</td>

</tr>

<tr height="20">

<td bgcolor="#FF6655" width="80%" valign="top">

<xsl:value-of select="price"/>

</td>

</tr>

<tr>

<td bgcolor="#FFFFFF" width="80%">

Quantity:

<input type="text" name="product" max="5" size="5"></input>

</td>

</tr>

</table>




</xsl:for-each>



<table width="100%">
<tr>
<td width="25%">
Customer Name
</td>
<td width="50%">
<input type="text" name="name" size="30" max="30"></input>
</td>
<td rowspan="5" width="25%">
<input type="submit" value="Place Order"></input>
</td>
</tr>
<tr>
<td width="25%">
Address
</td>
<td width="50%">
<input type="text" name="address" size="30"></input>
</td>
</tr>
<tr>
<td width="25%">
E-mail Address
</td>
<td width="50%">
<input type="text" name="email" size="30"></input>
</td>
</tr>
<tr>
<td width="25%">
Telephone Number
</td>
<td width="50%">
<input type="text" name="tel" size="30" max="30"></input>
</td>
</tr>
<tr>
<td width="25%">
Credit Card Number
</td>
<td width="50%">
<input type="text" name="card" size="30" max="30"></input>
</td>
</tr>
</table>



</form>

</body>

</html>

</xsl:template>

</xsl:stylesheet>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
xml, xsl

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:54.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42