Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Tag mismatch
rwinterpacht
I'm about ready to beat myself in the head with this one...anyone see what the problem is when trying to preview with this dcr/tpl?
XML parse error:
mismatched tag at line 7, column 3, byte 203 at /opt/iw-home/iw-perl/lib/perl5/site_perl/5.005/sun4-solaris/XML/Parser.pm line 185
:/default/main/content_management_projects/hsbc/us.hsbc.com/WORKAREA/empc55/templatedata/right_column/right_col_links/presentation/right_col_links.tpl
Here's the templating.cfg snippet:
<category name="right_column">
<locations>
<branch vpath-regex=".*" />
</locations>
<data-type name="right_col_links" dcr-type="iwov">
<presentation>
<template name="right_col_links.tpl" extension="html">
<locations>
<branch vpath-regex=".*" preview-dir="/">
<directory dir-regex=".*" />
</branch>
</locations>
</template>
</presentation>
</data-type>
</category>
Raf Winterpacht
Household Intl/HSBC
TS 5.5.2 sp3
Find more posts tagged with
Comments
Michael
Not 100% sure as I'm trying to get out of the office in a hurry
So apologies if I am on the wrong track.
xmlSpy complains that in your PT your div tags are not closed.
Hope this helps.
Cheers, Michael
resultPDF.JPG
documentView.JPG
InStory.JPG
InPage.JPG
rwinterpacht
It is though! There's a </div> at the bottom...weird...
<?xml version="1.0" encoding="ISO-8859-1"?>
<iw_pt name="Right Column Links">
<iw_if expr='({iw_value name="dcr.Right Column Presentation"/} eq "business" )'>
<iw_then>
<div class="sub_cont_box_bl">
</iw_then>
<iw_else>
<div class="sub_cont_box">
</iw_else>
</iw_if>
<h2><iw_value name='dcr.Section Title' /></h2>
<ul>
<iw_iterate list='dcr.Right Column Links Section' var='links'>
<li>
<iw_value name='links.Section'/>
</li>
</iw_iterate>
</ul>
</div>
</iw_pt>
Raf Winterpacht
Household Intl/HSBC
TS 5.5.2 sp3
rwinterpacht
Ok, here's my suspicion.
Because the <div class="..."> is in the if-then-else block, the compiler might anticipate that nothing will be returned, thus the closing div tag makes a mismatch. I think I need to put the closing div tag in another if-then-else block (which I think is pretty sloppy...) so it's complete html outside the if-then-else blocks.
Raf Winterpacht
Household Intl/HSBC
TS 5.5.2 sp3
LooseCannon
Try wrapping CDATA tags around the html
rwinterpacht
That didn't work either. It's ugly how I got it to work, but I took the entire html chunk and put it inside both the then and else clauses, only difference is that one has a slightly different class attribute.
Thanks for the suggestion, though.
Raf Winterpacht
Household Intl/HSBC
TS 5.5.2 sp3
herald10
Theres only one closing </div> tag, where as you have two opening <div> tags.Try including one more </div> tag.
rwinterpacht
I have two opening div tags, but only one or the other will be generated in the output html, because it's in the if-then-else logic. I can put comments around the div class in the if-then-else logic (for both conditions), and put a plain old div tag outside the if-then-else logic, and I get a generated page. When I view the source, there's only ONE commented div tag, and ONE real div tag (that I put in for the test.)
So the compiler simply isn't "smart" enough to know that logic facilitating certain tags will in fact result in clean html. I just don't know a clean way around this.
Thanks, though.
Raf Winterpacht
Household Intl/HSBC
TS 5.5.2 sp3
sample.pdf