473,786 Members | 2,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Weird diplay problem with XSL / XML

Hi Guys

You are probably my last chance to avoid getting crazy

To help you understand my problem I have put images online showing the
issue I have:
http://www.australix.net/images/pb
I have an XML file containing links and I use an XSL file to build a
menu using thoses links.
There is actually 2 levels in my menu as the links are organised
within sections.

When the menu is loaded, only the section headers are shown (see the
first image).
I you click on a section header, the links of the section are diplayed
(see the second image) and the other sections are closed.

But when I click on the second section, the links are displayed as it
should be but an additional and unwanted space appears below the fouth
section, with a few letters (the last letters of the fourth section
header) displayed at the bottom of this space ("h Engines" on the
third image).
The other sections are all working fine.

I have displayed the source of the page and if I search for the string
"Engines", I get only one result which is the regular fourth section
header. Moreover I can't hightlight the additional text but if I
hightlight the regular one the additional one is hightlighted too.
If I try to remove one or the other section from the xml file, I get
the same problem with another section, or even sometimes 2 !

I have tried everything and I can't find any logical relation between
the changes I do and the results I get.

Is there anyone who has already seen something like this ??

thanks for your help !

Luc

Feb 21 '07 #1
15 2097
On 21 feb, 14:26, "lucky" <lfe...@nordnet .frwrote:
Hi Guys

You are probably my last chance to avoid getting crazy

To help you understand my problem I have put images online showing the
issue I have:http://www.australix.net/images/pb

I have an XML file containing links and I use an XSL file to build a
menu using thoses links.
There is actually 2 levels in my menu as the links are organised
within sections.

When the menu is loaded, only the section headers are shown (see the
first image).
I you click on a section header, the links of the section are diplayed
(see the second image) and the other sections are closed.

But when I click on the second section, the links are displayed as it
should be but an additional and unwanted space appears below the fouth
section, with a few letters (the last letters of the fourth section
header) displayed at the bottom of this space ("h Engines" on the
third image).
The other sections are all working fine.

I have displayed the source of the page and if I search for the string
"Engines", I get only one result which is the regular fourth section
header. Moreover I can't hightlight the additional text but if I
hightlight the regular one the additional one is hightlighted too.
If I try to remove one or the other section from the xml file, I get
the same problem with another section, or even sometimes 2 !

I have tried everything and I can't find any logical relation between
the changes I do and the results I get.

Is there anyone who has already seen something like this ??

thanks for your help !

Luc
Install the Web Developer Extension for Firefox and use View Source,
View Generated Source.
http://chrispederick.com/work/webdeveloper/

Feb 21 '07 #2
I use the IE developer toolbar but I'm not able to find the additional
text. It's just as if it didn't exist!

Any other idea?
Feb 21 '07 #3
lucky wrote:
I use the IE developer toolbar but I'm not able to find the additional
text. It's just as if it didn't exist!
Maybe it doesn't exist.

Hard to say without having the source files to look at, preferably in a
simplified form that just demonstrates the part you're having trouble with.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Feb 22 '07 #4
Hi Joe

Thanks for your answer.
This is what I'm assuming is the faulty code.
-------------------------------------------------------------------------------
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/
Transform">
<xsl:variable name="dt" select="'number '"/<xsl:key name="items"
match="zrow" use="substring-before(substrin g-after(@ows_File Ref, '/
Quick Find/Useful Links/'), '/')" />
<xsl:template match="/">
<xsl:for-each select="//zrow[generate-id(.)=generate-
id(key('items', substring-before(substrin g-after(@ows_File Ref, '/Quick
Find/Useful Links/'), '/')))]">
<xsl:sort select="substri ng-after(@ows_File Ref, '#Lists/')"/>
<xsl:text>&#xa; </xsl:text>
<xsl:if test="substring-before(substrin g-after(@ows_File Ref, '/Quick
Find/Useful Links/'),'/') != ''">
<xsl:text>&#xa; </xsl:text>
<xsl:text>&#xa; </xsl:text>
<a href="javascrip t:void(0);" id="T2menuChann el{position()}"
onclick="showHi de('T2tab{posit ion()}a');
T2channelToggle ('T2menuChannel {position()}'); " class="leftNavC hannel">
<xsl:text>&#xa; </xsl:text>
<xsl:text>&#xa; </xsl:text>
<xsl:value-of select="substri ng-before(substrin g-
after(@ows_File Ref, '/Quick Find/Useful Links/'),'/')" />
<xsl:text>&#xa; </xsl:text>
</a>

<div id="T2tab{posit ion()}a" style="display: none;">
<xsl:text>&#xa; </xsl:text<table class="rightNav SubLinks">
<xsl:text>&#xa; </xsl:text><tr><t d style="border-width:
1;border-style:solid; ">
<xsl:for-each select="key('it ems',substring-
before(substrin g-after(@ows_File Ref, '/Quick Find/Useful Links/'),
'/'))">
<xsl:sort select="number( @ows_ItemOrder) "/>
<xsl:text>&#xa; </xsl:text>
<a href="{@ows_Nav igateURL}" target="_blank"
class="leftNavP osting0"><xsl:v alue-of select="@ows_Li nkTitle"/></a><br/
>
<xsl:text>&#xa; </xsl:text>
</xsl:for-each>
</td></tr>
<xsl:text>&#xa; </xsl:text<tr><td height="5px"></td></tr>
</table>
</div>
</xsl:if>
-------------------------------------------------------------------------------

Cheers

Luc

Feb 22 '07 #5
On Feb 22, 6:24 am, "lucky" <lfe...@nordnet .frwrote:
This is what I'm assuming is the faulty code.
Have you tried debugging it? Have you tried feeding it into
a standalone XSLT processor and attempting to find out
what's wrong with the resulting document? Have you tried
reproducing the bug in a test transformation?
[terrible code]
This is not well-formed, poorly indented and thoroughly
for-eachnalized. You haven't provided a sample document for
transformation either. What did you expect? As I happens, I
do possess a supernatural power of Gazing-At-A-Ball-Of-Mud-
And-Pointing-Straight-At-The-Bug, but I charge for using it
on per-hour basis.

--
Pavel Lepin

Feb 22 '07 #6
This is the first time I work with XML and I had a very short time to
do it.
So yes, it is probably not well-formated and whatever you want.

But there's no need to be rude.

Anybody else willing to be more constructive?

Feb 22 '07 #7
lucky wrote:
So yes, it is probably not well-formated and whatever you want.
If XML isn't well-formed (not "well-formatted", but structurally
correct) it simply isn't XML and no XML tool will accept it. I haven't
tried running your stylesheet code but if it's it really is ill-formed
you MUST start by fixing that or nothing else will work.
As Pavel pointed out, it's hard to debug code without knowing what the
input looks like and what output you expected from it. Trying to
reverse-engineer and debug someone else's code from first principles is
a pain in the arse, and you really want to make it easier for us if you
want assistance.
--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Feb 22 '07 #8
<p.*****@ctncor p.comwrote in message
news:11******** **************@ v45g2000cwv.goo glegroups.com.. .
On Feb 22, 6:24 am, "lucky" <lfe...@nordnet .frwrote:
>This is what I'm assuming is the faulty code.

Have you tried debugging it? Have you tried feeding it into
a standalone XSLT processor and attempting to find out
what's wrong with the resulting document? Have you tried
reproducing the bug in a test transformation?
>[terrible code]

This is not well-formed, poorly indented and thoroughly
for-eachnalized. You haven't provided a sample document for
transformation either. What did you expect? As I happens, I
do possess a supernatural power of Gazing-At-A-Ball-Of-Mud-
And-Pointing-Straight-At-The-Bug, but I charge for using it
on per-hour basis.

--
Pavel Lepin
Hey Lepin, everyone here is pretty fed-up with your sarcastic and belittling
posts.

You're a one-trick pony who only knows enough about XML to be dangerous. You
bully and intimidate people into thinking you know what you're talking
about, but the truth is you don't know much about anything.

You are coward who lacks the social grace of a common housefly. Do us all a
favor and keep your hole shut unless you have something helpful to
contribute.
Feb 22 '07 #9
This may be a good time to recommend that people review

http://www.catb.org/~esr/faqs/smart-questions.html

.... which is itself blunt almost to the point of being rude, but which
folks really need to understand if they're going to get help from Usenet.

(On the other hand, I do sorta agree that in many cases the right
response to a sloppy question is to ignore it, unless you have the
patience to walk them through correcting it.)

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Feb 23 '07 #10

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

Similar topics

3
2081
by: redneck_kiwi | last post by:
Hi all: I have a really weird problem. I am developing a customer catalog system for my company and as such have delved into sessions for authentication and access levels. So far, I have managed to get a working system just about finished. I am building an interface for our customer service folks to use to manage registered customers and am seeing some weird behavior.
4
3443
by: Albert Browne | last post by:
I am redesigning a web site to use css in place of tables. I am having a problem with the display: block; statement. With the display: block statement in place in the navbar div I am getting spaces between the lines. this can be seen at http://mildenhallgroup.org.uk/newsletter-new.htm With the display statement removed the spaces go but the lines are not full. How can I fix this? The navbar css follows: #navbar{ position: absolute;...
82
5389
by: nobody | last post by:
Howdy, Mike! mikecoxlinux@yahoo.com (Mike Cox) wrote in message news:<3d6111f1.0402271647.c20aea3@posting.google.com>... > I'm a C++ programmer, and have to use lisp because I want to use > emacs. I've gotten a book on lisp, and I must say lisp is the ugliest > looking language syntax wise. What is up with this: (defun(foo()). (DEFUN FOO () NIL) > What were the lisp authors thinking? Why did Stallman use lisp in
3
1149
by: Howard | last post by:
Help, How Do I diplay '&' as text on a comand Button !
0
933
by: moumita | last post by:
How to diplay a bitmap on form load. I want to display multiple bitmaps treating the form as a xy coordinate form. How do I scale a form as a xy coordinate screen.On various positions I want to display the bitmaps. Do you have a sample code for tht.
3
5489
by: aling | last post by:
Execute following T-SQL within Queary Analyzer of SQL Server 2000: ======================================= DECLARE @dTest DATETIME SET @dTest='2001-1-1 1:1:1:991' SELECT @dTest SET @dTest='2001-1-1 1:1:1:997' SELECT @dTest
0
1831
by: P Pulkkinen | last post by:
Dear all, sorry, i know this code is far little too long to debug here, but there is really annoying logical error. If someone debugs this, I really offer warm virtual handshake. What this code SHOULD do: - read new (=updated) licensetext from file $license_path then - read and modify recursively all files from $current_dir, replacing old
0
1320
by: daddyb1 | last post by:
RE: http://www.thescripts.com/forum/thread491642.html ###email removed### May 16th, 2006 10:35 AM Hi, Using Console.Writeline, as while ((strLine = stream.ReadLine()) != null) { sb.Append(strLine); Console.WriteLine(strLine); } this writes all the data to the screen at one go. Is there away to
1
1294
by: aBheE | last post by:
i have a table called main which allows the user to enter values and they will be stored in the table named main. this contains data of all the items the user has issued to the company. and this will update the qty on column of the products table aswell. on the products table there s another column called ReOrderLevel, which is defined by me and which contains the qty which if goes below the level the user shud order that particular product. ...
0
9655
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
10363
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...
0
9964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
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
6749
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
5398
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
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
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
3
2894
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.