473,657 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems Nesting Ellements: start tag doesnt match end tag?

3 New Member
The issue is that I need to place an a tag around an image in a .xslt file.
Structurally and logically I don't see why this isn't working.
Expand|Select|Wrap|Line Numbers
  1. <td class="bluecontent_head10d" colSpan="4">
  2.   <div style="float:left; padding-top:.5em;"><xsl:value-of select="/ppno/packages/package/[@title='PT_fulltime']"/> <span>Packaging & Pricing</span></div>
  3.   <div style="float:right; padding-right:.5em">
  4.     <a>
  5.       <xsl:attribute name="class">
  6.     <xsl:value-of select="subnav4" />
  7.       </xsl:attribute>
  8.       <xsl:attribute name="href">
  9.         <xsl:value-of select="<%=System.Configuration.ConfigurationSettings.AppSettings["JaguarSecuritySiteAddress"]%>/SecuritySite/Customer/ServiceSelection.aspx?p=3" />
  10.       </xsl:attribute>
  11.       <img>
  12.     <xsl:attribute name="src">
  13.       <xsl:value-of select="https://secure.officescape.com/shared/images/newimages/signup_icon3.gif" />
  14.     </xsl:attribute>
  15.     <xsl:attribute name="border">
  16.       <xsl:value-of select="0" />
  17.     </xsl:attribute>
  18.         <xsl:attribute name="align">
  19.           <xsl:value-of select="absMiddle" />
  20.         </xsl:attribute>
  21.       </img>
  22.       Signup for this Service
  23.     </a>
  24.   </div>
  25. </td>
  26.  
To me this seems fine but the .aspx page is returning the error:
The 'IMG' start tag on line '40' doesn't match the end tag of 'td' in file 'file:///C:/Inetpub/wwwroot/XSLTry/ToPPNO.xslt'. Line 40, position 111.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Xml.XmlE xception: The 'IMG' start tag on line '40' doesn't match the end tag of 'td' in file 'file:///C:/Inetpub/wwwroot/XSLTry/ToPPNO.xslt'. Line 40, position 111.
Everything appears to be valid so I am either missing something very simple or what I am trying to do just can't be done. It's all so straight forward that one would think that it would work. I even in the original code have all the special symbols notated as &#nn;. For the life of me I just can't figure this one out.
May 7 '07 #1
4 7911
dorinbogdan
839 Recognized Expert Contributor
Welcome to TheScripts TSDN...

I think that the attributes of <a> should be enclosed inside of <a...>, like
[html]<a class="..." href="..."> <img src="..." align="..." border="..."></img>
Signup for this Service</a>[/html]
(It may require to use &lt; and &gt; instead of < and > , for correctly parsing of html elements.)
May 7 '07 #2
rossable
3 New Member
Replaced the a tag and img tag with <xsl:element name="tag"> and it works fine.
No idea why this matters at all, but it's fixed so I don't care.
May 7 '07 #3
dorinbogdan
839 Recognized Expert Contributor
Ok, thanks for sharing the solution.
God bless you,
Dorin.
May 7 '07 #4
rossable
3 New Member
Ok, thanks for sharing the solution.
God bless you,
Dorin.
looking back on this the problem is so obvious now!
<img> does not have ending tags. you can end them like <img /> as in XHTML.
Sep 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2761
by: porterboy | last post by:
CONTEXT: I am using Emacs to edit Python code and sometimes also Matlab code. When I hit <return> in a loop of some sort, Emacs usually gets the nesting indentation right, which is particularly important in Python. To ensure this I have used python-mode.el and matlab.el modes in emacs. QUESTION: If I suddenly decide I want an outer loop, do I have to manually readjust the indentation of all the inner loops? Or can emacs do it
4
1889
by: ChaosKCW | last post by:
Hi Using Python 2.4 I am trying to procduce a generator which will return the results of dbi SQL statement using fetchmany for performance. So instead of fetching one record for each call, I will fetch batches of X (eg 100) and yeild each record in turn. For reasons of pure asthetics and my own learning I wanted it to look like this:
3
2695
by: shaun roe | last post by:
I have a document about 4 levels deep and in my XSLT I want to generate a unique string ID for each basic element based on its path through the hierarchy. If I use recursion, I am continually accessing the root element ID, here is a typical call: <xsl:variable name="fullPath" select="concat('p',../../../@id,'_c',../../@id,'_r',../@id,'_s',$slaveID) "/>
1
3050
by: Max Harvey | last post by:
Hi, I made up a nice little form which had its own sub form in it. I made a litle VB code so that when I pressed a button it would move form the form (frmConference) to the subform (frmBookingBookingBased), start a new record, and copy some values form the form into some fields in the subform, and then leave the cursor sitting (in focus) at the begining of the subform.
8
2850
by: Hardrock | last post by:
I encountered some difficulty in implementing dynamic loop nesting. I.e. the number of nesting in a for(...) loop is determined at run time. For example void f(int n) { For(i=0; i<=K; i++) For(i=0; i<=K; i++)
0
1220
by: Jeremiah Adams | last post by:
I am having two issues with the Datagrid and I hope that someone can help me out with them. 1) Printing. I pulled the code for sending the control to a printer off the msdn site. It works for the most part but will not print all the information contained in the control. For example, If the datagrid contains enough rows that the scroll bars become active and a user has to scroll down to display all the data the controll will only print...
5
1377
by: jack | last post by:
Hi I wanna know if nesting of tags inside similar tags is possible in XML. To be more clear, is <person> <son> <person>
6
1819
by: Neal | last post by:
Hi All, I used an article on XSLT and XML and creating a TOC written on the MSDN CodeCorner. ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncodecorn/html/corner042699.htm However, it did'nt quite answer all my questions. How would one create a 3 level TOC when each item level / node was differently named (They used Template match and for-each, but the template match worked as on a 3 level structure they usedf the same named xml...
6
2639
by: stephen.cunliffe | last post by:
Hi, I'm looking for opinion/facts/arguments on the correct nesting of UL, OL, & LI elements. For example, this is what I want (unordered list): * Item 1 * Item 2 * Item 3
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
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
4150
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
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
2
1601
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.