473,591 Members | 2,810 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xsl for an rdf file, src attribute won't create correct link to image file

with the following xsl and xml file, the display of the gif file with
the <image/url> tag works. However, the gif file in the <description>
tag using the name attribute "src" won't make the correct link to the
gif file. why?
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http ://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:lc="http://my.netscape.com/rdf/simple/0.9/">

<xsl:output method="html" />

<xsl:template match="lc:RDF">

<HTML>
<HEAD>
<TITLE>Resour ce Display Page</TITLE>
</HEAD>
<BODY>
<xsl:apply-templates select="lc:item "/>
</BODY>
</HTML>
</xsl:template>

<xsl:template match="lc:item" >
<P> </P>

<a><xsl:attribu te name="href"><xs l:value-of select="lc:link "
/></xsl:attribute>l ink
</a>

<P>image</P>
<TR>
<TD>
<xsl:element name="img">
<xsl:attribut e name="src"><xsl :value-of
select="lc:desc ription/@src" /></xsl:attribute>
<xsl:attribut e name="border">< xsl:value-of
select="lc:desc ription/@border" /></xsl:attribute>
</xsl:element>
</TD>
</TR>
</xsl:template>
<xsl:template match="lc:image ">

<img><xsl:attri bute name="src"><xsl :value-of select="lc:url"
/></xsl:attribute>
<xsl:attribut e name="width"><x sl:value-of select="lc:widt h"
/></xsl:attribute>
<xsl:attribut e name="height">< xsl:value-of select="lc:heig ht"
/></xsl:attribute>
</img>

<P>image</P>
<TR>
<TD>
<xsl:element name="img">
<xsl:attribut e name="src"><xsl :value-of
select="lc:desc ription/@src" /></xsl:attribute>
<xsl:attribut e name="border">< xsl:value-of
select="lc:desc ription/@border" /></xsl:attribute>
</xsl:element>
</TD>
</TR>
</xsl:template>
</xsl:stylesheet>

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http ://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://my.netscape.com/rdf/simple/0.9/">
<channel>
<title>Dilber t</title>
<link>http://dwlt.net/tapestry/</link>
<description>Ta pestry :: RSS Delivery of Web Comics</description>
</channel>
<image>
<title>Dilber t</title>
<url>http://dwlt.net/tapestry/img/tapestry.gif</url>
<link>http://dwlt.net/tapestry/</link>
<width>88</width>
<height>31</height>
</image>
<item>
<title>Dilber t for 09 Jun 2004</title>
<link>http://www.dilbert.com/comics/dilbert/archive/dilbert-20040609.html</link>
<guid isPermaLink="fa lse">http://www.dilbert.com/comics/dilbert/archive/dilbert-20040609.html</guid>
<description>
&lt;img src="http://www.dilbert.com/comics/dilbert/archive/images/dilbert20040672 40609.gif"
border="0" /&gt;
</description>
</item>
<item>
<title>Dilber t for 08 Jun 2004</title>
<link>http://www.dilbert.com/comics/dilbert/archive/dilbert-20040608.html</link>
<guid isPermaLink="fa lse">http://www.dilbert.com/comics/dilbert/archive/dilbert-20040608.html</guid>
<description>
&lt;img src="http://www.dilbert.com/comics/dilbert/archive/images/dilbert20610080 40608.gif"
border="0" /&gt;
</description>
</item>
<item>
<title>Dilber t for 07 Jun 2004</title>
<link>http://www.dilbert.com/comics/dilbert/archive/dilbert-20040607.html</link>
<guid isPermaLink="fa lse">http://www.dilbert.com/comics/dilbert/archive/dilbert-20040607.html</guid>
<description>
&lt;img src="http://www.dilbert.com/comics/dilbert/archive/images/dilbert21220170 040607.gif"
border="0" /&gt;
</description>
</item>
</rdf:RDF>
Jul 20 '05 #1
1 3278
j erickson wrote:
with the following xsl and xml file, the display of the gif file with
the <image/url> tag works. However, the gif file in the <description>
tag using the name attribute "src" won't make the correct link to the
gif file. why? <xsl:element name="img">
<xsl:attribut e name="src"><xsl :value-of
select="lc:desc ription/@src" /></xsl:attribute>
<xsl:attribut e name="border">< xsl:value-of
select="lc:desc ription/@border" /></xsl:attribute>
</xsl:element>


1. the description element from the namespace prefixed with lc has no
src attribute
2. there is no img element in the description element, just text
(&lt;img ... /&gt; is _not_ <img ... />).
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
13371
by: Karen Grube | last post by:
Hi! Each week, we receive a two-page PDF file from UPS along with a separate flat file (a CSV) The PDF file contains the overview of our weekly invoice and the CSV contains the details of each shipment. I download the file from UPS and then use DTS to import the data into SQL. At that point, I have a Crystal report that prints what looks like a regular UPS invoice. The only problem is that I wind up with having to print two...
3
7948
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images C:\Inetpub\wwwroot\RunReportASP is the directory of my virtual directory for my app. In it's properties I did check "Write" as a permission. What else do I need to do?
3
2277
by: Mark Olbert | last post by:
I have some img tags on a master page which reference files in a top-level directory. They look like this: <img src="assets/test.gif" id="gnr" /> assets is a subdirectory of the website root. My problem is this: this kind of path reference in a master page won't work when the page using the master is not in the root folder: root_page.aspx <- if this uses the master, the image file will be located and displayed correctly
2
1290
by: Phat G5 (G3) | last post by:
I am trying to do something seemingly difficult. I am trying to take the value from a file input and set the source of an image to the value of the file input. It seems to only work on Safari. In FF I can do it and then when viewing the rendered chart I see the image is there with the correct path and all. For example file:///Users/me/desktop/1234.jpg Is this a security thing? I can have multiple images from multiple domains on a page but...
3
3998
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user selects? thanks...
13
8147
by: Bill Nguyen | last post by:
Is it possible to create your won XSD to use with .NET based on an XML content? For example the one below: <?xml version="1.0"?> <pcats:FuelsDoc xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="NAXML-FuelPrice15.xsd"> <pcats:TransmissionHeader>
38
5053
by: ted | last post by:
I have an old link that was widely distributed. I would now like to put a link on that old page that will go to a new page without displaying anything.
7
7138
Curtis Rutland
by: Curtis Rutland | last post by:
Building A Silverlight (2.0) Multi-File Uploader All source code is C#. VB.NET source is coming soon. Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and Silverlight 2.0. To get these tools please visit this page Get Started : The Official Microsoft Silverlight Site and follow Step 1. Occasionally you find the need to have users upload multiple files at once. You could use multiple FileUpload...
4
8050
by: naveenmurthy | last post by:
Hello All, I have created a .mht file in following format. 1. The .mht file contains following htmls. a. MHTLinkingProblem.html b. Left.html c. Right.html d. Start.html
0
7870
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8362
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
5732
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5400
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3850
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3891
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1465
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.