Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
XML / XSLT Problem selecting attributes
Old 11-23-2004, 04:48 AM XML / XSLT Problem selecting attributes
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Hi All,

I have the following stylesheet:

http://www.minaki.co.uk/test/GAZReslt.xsl

This is used to render an XML Recordset into an HTML Table. For most of the data, it works fine - however I have just noticed, on one of the other data providers, it doesn't work.
What's happening is that in some of the returned records, there are missing attributes. Here's a sample XML File:

http://www.minaki.co.uk/test/sample.xml

As you can see, in the 2nd half of the z:row's returned, 'TheAANRef' is missing and added to the end in an attribute called rs:forcenull. This shouldn't be a problem, but the XSL File is wrong.
Firstly, it draws the table header based on the schema. Then it draws each row based on the attributes of each z:row element. Unfortunatly, it uses the order of the elements as they are in z:row and not the schema, which makes it mess up (as you can see if you save them both and open in Explorer or something)

I've tried to figure it out myself, been sifting through XSLT tutorials, but I just can't get the hang of it. I know what I need to do, just not how...

Can anyone help?
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
 
Register now for full access!
Reply     « Reply to XML / XSLT Problem selecting attributes
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.88628 seconds with 12 queries