473,322 Members | 1,314 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,322 software developers and data experts.

Problems Nesting Ellements: start tag doesnt match end tag?

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.XmlException: 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 7894
dorinbogdan
839 Expert 512MB
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
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 Expert 512MB
Ok, thanks for sharing the solution.
God bless you,
Dorin.
May 7 '07 #4
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
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...
4
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...
3
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...
1
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...
8
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++)...
0
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...
5
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
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...
6
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
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.