Go Back   Dreamweaver Club Forums > Dreamweaver forums > Spry
Register FAQ Members List Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Old 09-18-2008, 10:04 AM   #1
Join Date: Sep 2008
Posts: 3
Default Nested XML Data Set problems

Hi. I'm learning to use the Spry framework and I've ran into some problems while creating nested xml data sets.

I have all the necessary .js and spry files linked. My goal is to use a data set like dsProjects4, one that is nested and that is linked to the "language" of the dsLanguages data set. That way, when the language changes, the data displayed by regions linked to dsProjects4 will change accordingly. It works if it's not a nested data set (dsProjects2), but I don't understand why it doesn't if it's nested.

Can anyone tell me what I'm doing wrong and why the nested xml data set number 4 doesn't work?

Thank you in advance.




   <project name="proj1">
         <title>project one</title>
         <title>projecto um</title>
   <project name="proj2">
         <title>project two</title>
         <title>projecto dois</title>
</project list>

I then build the datasets on my index.html:
var dsLanguages = new Spry.Data.XMLDataSet("xml/languages.xml", "language_list/language");
var dsProjects1 = new Spry.Data.XMLDataSet("xml/projects.xml", "project_list/project");
var dsProjects2 = new Spry.Data.XMLDataSet("xml/projects.xml", "project_list/project/{dsLanguages::language}");
var dsProjects3 = new Spry.Data.NestedXMLDataSet(dsProjects1, "english");
var dsProjects4 = new Spry.Data.NestedXMLDataSet(dsProjects1, "{dsLanguages::language}");

And then I create the regions that will receive the data:
<p class="text_01" spry:region="dsProjects2">{title}</p> //displays "project one";
<p class="text_01" spry:region="dsProjects3">{title}</p> //displays "project one";
<p class="text_01" spry:region="dsProjects4">{title}</p> //displays nothing;
maguskrool is offline   Reply With Quote

Thread Tools
Display Modes

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

Forum Jump

All times are GMT. The time now is 08:47 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com