473,326 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Welcome any assistance

Definitely welcome any assistance.

Inherited some code with an xml structure I don't think is the best. In the
short term I have to live with what's there.

Everything appears correctly until you mouse over the link and get a
concantenation of all data elements, e.g.
http://www.anydomain.com?key=1234key....jsp09/12/2005. The data is
located within the datagram of the parent element which also has child
elements. With the stylesheet how do I separate out the link information
and strip the rest? I'm sure it must be a simple solution and my brain is
just on lock down.

Example xml:

<?xml version="1.0" encoding="UTF-8"?>
<images>
<image>
http://www.anydomain.com?key=1234
<image-filename>keyimage1234.jsp</image-filename>
<image-lastmodified>09/12/2005</image-lastmodified>
</image>
<image>
http://www.anydomain.com?key=3456
<image-filename>keyimage3456.jsp</image-filename>
<image-lastmodified>09/22/2005</image-lastmodified>
</image>
<image>
http://www.anydomain.com?key=7898
<image-filename>keyimage7898.jsp</image-filename>
<image-lastmodified>09/31/2005</image-lastmodified>
</image>
</images>
Example xslt:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="image">
<a href="{.}"><xsl:value-of select="image-filename"/></a> (last modified:
<xsl:value-of select="image-lastmodified" />)<br/><br/>
</xsl:template>

</xsl:stylesheet>
Example results:

keyimage1234.jsp (last modified: 09/12/2005)

keyimage3456.jsp (last modified: 09/22/2005)

keyimage7898.jsp (last modified: 09/31/2005)
Sep 24 '05 #1
1 1096
In article <aJbZe.28051$hp.22037@lakeread08>,
"Toney" <to*******@cox.net> wrote:
Definitely welcome any assistance.

Inherited some code with an xml structure I don't think is the best. In the
short term I have to live with what's there.

Everything appears correctly until you mouse over the link and get a
concantenation of all data elements, e.g.
http://www.anydomain.com?key=1234key....jsp09/12/2005. The data is
located within the datagram of the parent element which also has child
elements. With the stylesheet how do I separate out the link information
and strip the rest? I'm sure it must be a simple solution and my brain is
just on lock down.

Example xml:

<?xml version="1.0" encoding="UTF-8"?>
<images>
<image>
http://www.anydomain.com?key=1234
<image-filename>keyimage1234.jsp</image-filename>
<image-lastmodified>09/12/2005</image-lastmodified>
</image>
<image>
http://www.anydomain.com?key=3456
<image-filename>keyimage3456.jsp</image-filename>
<image-lastmodified>09/22/2005</image-lastmodified>
</image>
<image>
http://www.anydomain.com?key=7898
<image-filename>keyimage7898.jsp</image-filename>
<image-lastmodified>09/31/2005</image-lastmodified>
</image>
</images>
Example xslt:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="image">
<a href="{.}"><xsl:value-of select="image-filename"/></a> (last modified:
<xsl:value-of select="image-lastmodified" />)<br/><br/>
</xsl:template>

</xsl:stylesheet>
Doesnt this do what you want:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="image">
<a href="{normalize-space(text())}"><xsl:value-of
select="image-filename"/></a> (last modified:
<xsl:value-of select="image-lastmodified" />)<br/><br/>
</xsl:template>
</xsl:stylesheet>



Example results:

keyimage1234.jsp (last modified: 09/12/2005)

keyimage3456.jsp (last modified: 09/22/2005)

keyimage7898.jsp (last modified: 09/31/2005)

Sep 25 '05 #2

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

Similar topics

0
by: Roger Bonine | last post by:
Can anyone point me to C# or (even better) VB.NET code to offer remote assistance to a WinXP workstation? I'm writing a helpdesk app and I want the helpdesk user to be able to initiate a Remote...
4
by: Ajay Tiku | last post by:
Hi every one, I am trying to build an applicatiuon which is supposed to read some data from excel spread sheet. can some one please help me in showing how. The excel file is created by other...
5
by: Bill | last post by:
Good Day; I would appreciate assistance developing a query that I haven't been able to develop without using a second table. I wish to count the number of records that are still open on the...
0
by: Jawahar | last post by:
All I had posted this in the remote assistance group and could not get any replies so I thought that I could try in the developer group Thanks One of the issues we face when helping our remote...
2
by: Rudy Ray Moore | last post by:
Whenever I get any error with Vc++7.1/.net/2003, it is followed by huge ammounts of "template assistance" error messaging referencing template code (MTL) that has nothing to do with the error. ...
0
by: Davie | last post by:
I have an application which would create an email, however, I would ideally like to attach a remote assistance file from the user. Can this be done through code, where the email is created and the...
3
by: gaurav92K | last post by:
sir i am working in a company . there are many pc. i want to use remote assistance. i configure all group policy which are related remote assistance.and i enable service through remote in system...
2
by: gaurav92K | last post by:
sir, why are you not tell me about setting of remote assistence in win xp. i want to establish remote assistace ,i enable all group policy setting about remote assistance and check all essential...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.