Nested XML data set
Hi there,
I have a problem with displaying some nested XML data. I've
tried quite a lot of different approachey to this, but just can't
get it working properly. So here's the deal:
I have an XML file (which is dynamically created from a
servlet) of the form:
<variations>
<variation>
<name>...</name>
<...>...</...>
<links>
<link>
<type>...</type>
<name>...</name>
</link>
</links>
</variation>
</variations>
On my webpage, I use a Spry tabbed panel with one tab for
each of the 'variation's in the XML file. Within the tabs I have
(many) form fields dynamically filled with the values from the XML
and that all works fine, but I also want to display a table with
one row corresponding to each 'link'... and that just won't work...
My latest approach looks something like this:
<head>
<script type="text/javascript">
<!--
var dsVariations = new
Spry.Data.XMLDataSet("Servlet?id=1&cmd=getVariations",
"variations/variation");
var dsLinks = new
Spry.Data.XMLDataSet("Servlet?id=0&cmd=getLinks",
"links/link");
//-->
</script>
</head>
<body>
<div id="TabbedPanels1" spry:region="dsVariations">
<div id="TP1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li spry:repeat="dsVariations" class="TabbedPanelsTab"
tabindex="0">{dsVariations::name}</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div spry:repeat="dsVariations"
class="TabbedPanelsContent">
// a lot of form stuff
<table border="1">
<script type="text/javascript">
dsLinks.setURL("Servlet?id={dsVariations::id}&cmd=getLinks");
dsLinks.loadData();
</script>
<tr spry:repeat="dsLinks">
<td>{dsLinks::type}</td>
<td>{dsLinks::name}</td>
</tr>
</tr>
</table>
</div>
</div>
</body>
In this, the Servlet call with cmd=getVariations returns the
whole XML stated above, while the cmd=getLinks will only get the
corresponding part (everything between <links> and
</links>).
The error message I get for this is: processTokens() failed
to get a data set context!.
I previously tried to use a NestedXMLDataSet, but couldn't
get that working either... I'm really kind of stuck by now and
would appreciate any help.
Thanks,
Florian
PS Thanks a lot for creating Spry: It's great!
Thanks for your reply, Cristian.
I'm afraid I couldn't do that since it would cause the whole
region to be reloaded constantly (because it's being updated each
time I do the setURL / loadData)... in fact, I tried this before
and it didn't work.
But, in fact, I figured that the fact that I could not get it
running using a NestedXMLDataSet (as I would generally prefer), did
not actually come down to a problem in the page source code, but
actually to a problem with the very XML itself:
I tried to recreate the simple nested data set example (
http://labs.adobe.com/technologies/spry/samples/data_region/NestedDataSample.html)
and basically used the same code and an almost identical XML
structure... yet it doesn't work. The contents of dsFeatures just
won't be displayed and when I'm inspecting the contents of
dsFeatures (using Firebug) it shows me that the dataset is empty. I
just don't get why it works for your example, but not for my
modified version... I can't see any crucial difference :-s.
To simplify the problem I deleted most tags from the XML and
saved it in a static document "variations.xml":
<variations>
<variation>
<name>Var 1</name>
<features>
<feature>none</feature>
<feature>feat1</feature>
<feature>feat2</feature>
</features>
</variation>
<variation>
<name>Var 2</name>
<features>
<feature>none</feature>
</features>
</variation>
</variations>
The source of the test page would be:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:spry="
http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Nested Data Sample</title>
<script language="JavaScript" type="text/javascript"
src="SpryAssets/xpath.js"></script>
<script language="JavaScript" type="text/javascript"
src="SpryAssets/SpryData.js"></script>
<script language="JavaScript" type="text/javascript"
src="SpryAssets/SpryNestedXMLDataSet.js"></script>
<script type="text/javascript">
var dsVariations = new Spry.Data.XMLDataSet("variations.xml",
"/variations/variation");
var dsFeatures = new Spry.Data.NestedXMLDataSet(dsVariations,
"features/feature");
</script>
</head>
<body>
<table border="1">
<tr>
<th width="30%"
onclick="dsVariations.sort('name');">dsVariations</th>
<th width="30%"
onclick="dsFeatures.sort('link')">dsFeatures</th>
<th width="30%">dsVariations + dsFeatures</th>
</tr>
<tr>
<td valign="top"><div
spry:region="dsVariations">
<ul>
<li spry:repeat="dsVariations" spry:select="select"
spry:hover="hover" spry:setrow="dsVariations"> {name}
</li>
</ul>
</div></td>
<td valign="top"><div spry:region="dsFeatures">
<ul>
<li spry:repeat="dsFeatures"> {dsFeatures::feature}
</li>
</ul>
</div></td>
<td valign="top"><div spry:region="dsVariations
dsFeatures">
<ul>
<li spry:repeat="dsVariations"> {dsVariations::name}
<ul>
<li
spry:repeat="dsFeatures">{dsFeatures::feature}</li>
</ul>
</li>
</ul>
</div></td>
</tr>
</table>
</body>
Evidently, I'm missing some essential simple point here...
Thanks,
Similar Messages
-
Hello,
I'm doing my best to create a page in Dreamweaver CS4 utilizing Spry datasets and, I hope, a valid nested XML file. What I want to do is use one XML file that provides the content for my nav div and my content div. It would, in essence, display as an outline. When a user clicks on an item in the nav div the content would be displayed. What I'm guessing would work for the XML file would be this format:
<content>
<topic name="Elements"> //--this would serve as the nav element and trigger
<header>Non-editable</header> //--this would serve as a header in the content area
<info>
<detail id="1">CSS, javascript</detail> //--this would serve as detail under the headers in the content area.
<detail id="2">Headers</detail>
<detail id="3">Footers</detail>
<detail id="4">Areas within navigation panel</detail>
</info>
</topic>
</content>
I got the idea from this page in Live Docs: Create a Spry nested data set. Also from a Labs page called Nested XML Data Sample. I've been able to make various parts of the page work but I don't know what is broken. My issues are this:
I once saw but can no longer find a method for preventing redundant display of data. In this case, the nav elements which are attributes in my XML file.
The details are showing up in my content area. I must be doing the code for the nesting incorrectly.
I want to then use the details in the content area to trigger spry tooltips, the content for whih would be genereated from an XML file or HTML frags.
Here is my latest, ill-fated attempt:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Menu - Content Example</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryNestedXMLDataSet.js" type="text/javascript"></script>
<script src="SpryAssets/xpath.js" type="text/javascript"></script>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<link href="SpryAssets/SpryStackedContainers.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
var dsContent5 = new Spry.Data.XMLDataSet("navigation/content5.xml", "content/topic", {useCache: false});
var dsInfo = new Spry.Data.NestedXMLDataSet(dsContent5, "info/detail");
//-->
</script>
</head>
<body>
<div id="wrapper">
<div id="header">
<h1>CSU Website Clinic</h1>
<h3>Bill Milhoan, IS&T Technical Trainer</h3>
</div>
<div id="content" spry:region="dsInfo">
<ul spry:repeatchildren="dsInfo">
<li>{dsContent5::info}</li>
</ul>
</div>
<div class="nav" spry:region="dsContent5">
<ul spry:repeatchildren="dsContent5" spry:choose="">
<li spry:when="{dsContent5::ds_CurrentRowID} == {dsContent5::ds_RowID}" spry:setrow="dsContent5" spry:select="select" spry:hover="hover" spry:selected="">{dsContent5::@name}</li>
<li spry:default="" spry:setrow="dsContent5" spry:select="select" spry:hover="hover">{dsContent5::@name}</li>
</ul>
</div>
</div>
</body>
</html>
Thoughts? My hope is to distill this process so I can teach others how to do it in the hopes that they will find it easier to keep their department/program websites up-to-date.
Thanks for the help.
Bill Milhoan
Cleveland State UniversityI apologize, im using Spry XML Data Set. i guess the best way to describe what im trying to do is, i want to use the Non-desctructive filter sample with the Spry Nested XML Data sample. So with my sample xml on my first post and with the same code non-destructive filter is using, im having trouble trying to search repeating nodes, for some reason it only searches the last node of the repeating nodes. Does that make sense? let me know.
thank you Arnout! -
Correction for Nested XML Data Sample
I found an error in the sample code on the
Nested
XML Data Sample under "Using Nested Data Sets." Line 8 has
var dsToppings = new Spry.Data.NestedXMLDataSet(dsItems1,
"toppings");, but it should be
var dsToppings = new Spry.Data.NestedXMLDataSet(dsItems1,
"topping"); in order to match the XML file.
Another suggestion for us newbies would be to have the
samples start with a comment about any additional scripts we need
to insert into our files. It took me a long time to realize I
needed to include
<script type="text/javascript"
src="scripts/SpryNestedXMLDataSet.js"></script> with
the others in the head.
Thanks for your work!
JonathanHi Jonathan,
Thanks for catching that. I corrected the doc and the change
will appear when we release 1.5.
Also, regarding <script> includes sample, yes, we
should definitely be doing that.
Thanks!!!
--== Kin ==-- -
Using Non-destructive filter with Nested XML data
Hi,
How do you use Non-destructive filter with Nested XML data?
I am using the non-destructive filter sample with my own xml which is setup to search for the <smc></smcs> in my xml below. But when i test it it only searches the last row of the "smc". How can i make it work so it can search for repeating nodes? or does it have something to with how my xml is setup?
<ja>
<url>www.sample.com</url>
<jrole>Jobrole goes here</jrole>
<prole>Process role goes here...</prole>
<role>description...</role>
<prole>Process role goes here...</prole>
<role>description....</role>
<prole>Process role goes here...</prole>
<role>description...</role>
<sjc>6K8C</sjc>
<sjc>6B1B</sjc>
<sjc>6B1F</sjc>
<sjc>6B1D</sjc>
<smc>6C9</smc>
<smc>675</smc>
<smc>62R</smc>
<smc>62P</smc>
<smc>602</smc>
<smc>622</smc>
<smc>642</smc>
<smc>65F</smc>
<smc>65J</smc>
<smc>65L</smc>
<smc>623</smc>
<smc>625</smc>
<smc>624</smc>
<smc>622</smc>
<audience>Target audience goes here....</audience>
</ja>
here is the javascript that runs it.
function FilterData()
var tf = document.getElementById("filterTF");
if (!tf.value)
// If the text field is empty, remove any filter
// that is set on the data set.
ds1.filter(null);
return;
// Set a filter on the data set that matches any row
// that begins with the string in the text field.
var regExpStr = tf.value;
if (!document.getElementById("containsCB").checked)
regExpStr = "^" + regExpStr;
var regExp = new RegExp(regExpStr, "i");
var filterFunc = function(ds, row, rowNumber)
var str = row["smc"];
if (str && str.search(regExp) != -1)
return row;
return null;
ds1.filter(filterFunc);
function StartFilterTimer()
if (StartFilterTimer.timerID)
clearTimeout(StartFilterTimer.timerID);
StartFilterTimer.timerID = setTimeout(function() { StartFilterTimer.timerID = null; FilterData(); }, 100);
I really need help on this, or are there any other suggestions or samples that might work?
thank you!I apologize, im using Spry XML Data Set. i guess the best way to describe what im trying to do is, i want to use the Non-desctructive filter sample with the Spry Nested XML Data sample. So with my sample xml on my first post and with the same code non-destructive filter is using, im having trouble trying to search repeating nodes, for some reason it only searches the last node of the repeating nodes. Does that make sense? let me know.
thank you Arnout! -
I have an issue with Spry XML Data sets that is driving me nuts.
The setup is quite straightforward. I have a PHP script which submits a SOAP request, the result of which is pure XML. I echo this XML out as the result of the script.
I have another page on which is one or more Spry XML Data Sets. These data sets use the previous script as the source. I know this works OK because when i 'Get Schema' in the XML dataset dialog in Dreamweaver, the schema is properly displayed. This page also has a Spry Table on it, which uses the dataset as the source. There is nothing else on the page at all.
Now, when I preview this page in Firefox, Chrome, Opera or Safari, it displays fine. However, when I preview it in IE, the table briefly flashes up then disappears. A quick look at the source of the page shows the HTML all laid out very licely, but the Spry fields still show with their placeholders (e.g. {Balance}) instead of the actual value. Im left with a totally blank page in IE.
I have tried running in compatibility mode with no effect. I found a posting on Experts Exchange (yuk!) where someone else was having the problem but this turned out to bedue to badly formed XML. I have run my XML though XMLSpy and several online validators and it checks out every time.
Any ideas? I am slowly losing the will to live....
SiHi,
I'm trying to debug the same problem...I think.The pages work in firefox on PC & MAC but stop with the {data_name} in IE on both PC & MAC.
I'm using Dreamweaver CS3 with ADDT. I've read the posts about adding the content-type to my file that ADDT created for me just before the XMLExport, so I've added that to the get_menu_1_info.php file (see lines 42-46). I've peeked into the XMLExport.class.php file to see that the Execute function is supposedly already sending the header info (see line 223). But I'm not getting the data into IE.
Any help would be appreciated!
here's where you can see the page:
https://hbblearning.org/Takv3uMYsX7cVK5eRo/newcomer_info.html
here's where I generate the xml file to be consumed:
https://www.hbblearning.org/get/get_menu_1_info.php
I've attached the files for you to see. -
XML Data Set with Spry Slides - Please Help
Hi, I'm trying to combine XML Data Set with sliding tabs.
I've created two keys responsible for sliding the tabs:
<a id="previous" href="#"
onclick="sp1.showPreviousPanel();">Previous</a>
<a id="next" href="#"
onclick="sp1.showNextPanel();">Next</a>
Then XML Data Set is used to populate the tabs, but only a
single tab remains visible, and a "Next/Previous" buttons are used
to move to the next tab. And this is where the problem arises.
The problem is that, every time I refreash the gallery or
load it for the first time, I have to press TWICE the "Next" button
to move to the next image. After that, its all fine, and slides
well. It's only the FIRST time when loaded.
Please help.
Here's the full code:
<div id="images_gal" >
///////////////////////////////////////// The menu - the
culprit///////////////////////////////////////////
<div id="menu_next">
<a id="previous" href="#"
onclick="sp1.showPreviousPanel();">Previous</a>
<a id="next" href="#"
onclick="sp1.showNextPanel();">Next</a>
</div>
//////////////////////////////////////// The Sliding Panels
Gallery ////////////////////////////////////////////////////
<div id="example2" class="SlidingPanels" tabindex="0" >
<div class="SlidingPanelsContentGroup"
spry:region="dsSpecials">
<div spry:repeat="dsSpecials" id="{first}"
class="SlidingPanelsContent{second}"><div class="top_gal"
></div><div class="main_gal"><img
src="images/Galery/{third}" alt="Digital_Signage" width="600"
height="304" />
<p class="screen_gal"><a href="#"
onclick="MM_openBrWindow('film1.html','Coloris','width=340,height=260,
top=250, left=250')">CLICK TO VIEW</a></p>
</div><div
class="bottom_gal"></div></div>
</div>
</div>Anyone has any idea why I need a DOUBLE Click to start moving
the sliding panels?
I've just completed two tutorials by Don Booth.
1/Building a Spry Sliding Panels widget
2/Building a photo album with the Spry framework
But what I try to COMBINE them - display the photos in
sliding panels, I also need to DOUBLE click the "next" buton before
it starts scrolling.
Why is that Double Click needed? Help Please.
Here's my code for the combined version:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
a {
position:relative;
left:23px;
top:127px;
z-index:10000;
color: #FF0000;
</style>
<script type="text/javascript"
src="photo_album_samples/includes/xpath.js"></script>
<script type="text/javascript"
src="photo_album_samples/includes/sprydata.js"></script>
<script type="text/javascript"
src="Spry/SprySlidingPanels.js"></script>
<link type="text/css" rel="stylesheet"
href="Spry/SprySlidingPanels.css">
</head>
<body>
<div >
<a href="#" onclick="sp1.showPreviousPanel();">Previous
Panel</a>
<a href="#" onclick="sp1.showNextPanel();" >Next
Panel</a>
</div>
<div id="panelwidget" class="SlidingPanels" >
<div class="SlidingPanelsContentGroup"
spry:region="dsGallery" >
<div spry:repeat="dsGallery" class="SlidingPanelsContent"
id="p1"><img
src="photo_album_samples/thumbnails/{@thumbpath}"/></div>
</div>
</div>
<script type="text/javascript">
var dsGallery = new
Spry.Data.XMLDataSet("photo_album_samples/photos.xml",
"gallery/photos/photo");
</script>
<script type="text/javascript">
var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
</script>
</body>
</html> -
Build a table based on XML data set with Spry
Hi there,
I'm new to spry technology therefore forgive any basic question of mine.
I'm trying to fill content in a table based on XML data set values but nothing is shown :-(
here is my code.... any suggestion? pls tell me where I'm wrong.
Thank you in advance
<script src="SpryAssets/xpath.js" type="text/javascript"></script>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
var uscite = new Spry.Data.XMLDataSet("data/Calendario 2011.xml", "csv_data_records/record", {sortOnLoad: "Date", sortOrderOnLoad: "ascending"});
uscite.setColumnType("Date", "date");
uscite.setColumnType("km", "number");
</script>
<div class="RankContainer" id="UsciteDiv" spry:region="uscite" >
<table width="100%" border="0" class="RankTable">
<tr>
<th width="10%" scope="col" spry:sort="Date">Data</th>
<th width="20%" scope="col">Destinazione</th>
<th width="5%" scope="col">KM</th>
<th width="35%" scope="col">Percorso</th>
<th width="30%" scope="col">Breve</th>
<!-- <th width="15%" scope="col">Mappa</th>-->
</tr>
<tr>
<script type="text/javascript">
var rows = uscite.getData();
for (var i = 0; i < rows.length; i++)
if (rows[i]["Mappa"].startsWith("/"))
rowContent = "<td> si </td>";
else
rowContent = "<td> no </td>";
document.write("<td>{Date}</td>");
document.write("<td>"+rowContent+"</td>");
document.write("<td>{km}</td>");
document.write("<td>{Percorso}</td>");
document.write("<td>{Breve}</td>");
</script>
</tr>
</table>
</div>Sure this is how it should work (except that no anchor tag shall be present for Destinazione whereas Mappa has no real value in)
http://www.gsc-borsano.it/_Calendario%202011.html
and this is the non working page
http://www.gsc-borsano.it/_v2Calendario%202011.html
Thanks -
Spry xml data set, accessing specific rows
Hello. I've been trying to build a website using Spry XML
Data Sets, and while I've accomplished my goals for now, I don't
think the solution I came up with is the best.
The website consists of several areas that show projects.
Each project has several fields that are to be filled with content
retrieved from the xml files, but the projects are not all exactly
alike and some have specific fields that others don't require.
All the info is available in several languages, so for now
I've created an xml file for each one. An xml file could be like
Code Part1. (Why I can't add several code snippets along the post
baffles me. I mean, I can't, right?)
This dataset, for simplicity purposes, is not dependent on
the language (Code Part2).
And then there are the content areas (Code Part3).
So as you see, each project has its own structure. This makes
using spry:repeat a not very effective method for filling in all
the content. Ideally I should be able to access each row in the
dataset through some sort of value, like id, or one of its
children's values. The ds_RowID depends on the row order, so unless
there's another way to use it, it doesn't solve my problem.
Here's what I've come up with (Code Part4).
This works (in FF3 OSX, at least), although there are some
other problems that might make it necessary to create a spry:region
(or at least use spry:repeat) for each field. Anyway, it sounds
silly and wasteful to go through every row of the dataset everytime
for each of the fields that need to be filled.
My hope is that I'm ignorant of some much better method of
achieving my goals, something more direct and elegant.
Can anyone help me out with this? Thank you very much in
advance.Hi there
You are indeed absolutely correct a spry region should have been shown, my appologise for that, the code is wrapped in a standard spry region.
That being said i have used a work around in the SQL SELECT statement of the xmlExportObj, Recordset to find the information required without having to do any IF, ELSE on the page.
Many thanks for your reply and for pointing out my mistake in how I had presented my question.
My next question is to follow seperately
Regards
Ray -
Spry XML data set and dynamic post variables
Hi,
I am trying to create an XML data set that has dynamic post
variables.
Everytime something is pressed on the page a variable changes
and I then want to reload the XML data set using the new variable.
I know I can just pull in an XML with all possible variables
and filter client side but this would make it way too large.
Does anyone know what I may need to do.
I tried this:
var myVar = 0;
var dss = new Spry.Data.XMLDataSet (
'../../cgi-bin/server_details.pl' , 'top' , { method: 'POST' ,
postData: sid=ajaja21&ip=127.0.0.1&cid=' . myVar ,
subPaths: [ "auth" , "plugins" , "plugins/plugin" ] , keepSorted:
"true", sortOnLoad: "plugins/plugin/order", sortOrderOnLoad:
"descending", useCache: false, loadInterval: 10000 } );
onclick="myVar=1";
But the script doesn't understand the post variables sent (it
does when I remove the . myVar part and put in a static value). I
think it isn't sending that dynamic variable with the post
variables.
Any ideas anyone?
ThanksWell I had it working when I stripped back everything and
just had the dss data set and a single onclick function, but now
that I put it back together it hash foobared again.
Here are the relevant bits of code that I've changed.
The function to change server id:
//function to run when changing the server id
function changeServer ( sid ) {
//set the url to use the current server id
dss.setURL = ( '../../cgi-bin/server_details.pl' , { method:
'POST' , postData:
'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1&cid='+sid
//force a reload of the server data
dss.loadData();
The inital load of the data set
var dss = new Spry.Data.XMLDataSet (
'../../cgi-bin/server_details.pl' , 'yams' , { method: 'POST' ,
postData:
'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1&cid=0' ,
subPaths: [ "auth" , "plugins" , "plugins/plugin" ] , keepSorted:
"true", sortOnLoad: "plugins/plugin/order", sortOrderOnLoad:
"descending", useCache: false, loadInterval: 10000 } );
And the part that changes the server id
<td align="left" style="cursor:default; width:174px;"
onclick="changeServer({dsv::servers/server/@id})">{dsv::servers/server/name}</td>
I checked that the function is receiving the correct server
id and I even tried hard coding the cid variable to 2 in the change
function but it still wasn't changing on the server side.
Any ideas?
Thanks -
Including HTML tags in Spry XML data sets
How does one add HTML tags to Spry XML data sets so that the displayed items include that markup?
For example, I might want to bold-face words within XML data items. I have tried adding the markup, but instead of seeing, for example:
This is bold face
in the Spry table, I see:
This is <b>bold</b> face
I have tried using CDATA elements in the XML to no avail.Set the data type for the column as per
var ds1 = new Spry.Data.XMLDataSet("myData.xml", "rows/row");
ds1.setColumnType("myColumn", "html");
Gramps -
Spry Tables and Xml Data Sets viewed in IE7
Has anyone ever run into a problem with Spry Tables and Xml
Data Sets viewed in IE7? Work fine in IE6 and Firefox, but get the
error "exception caught while loading feed.xml: [object Error]" in
IE 7. Any ideas?
Attached is the xml I'm using.
ThanksI came looking for the answer to this question. I could not
find an answer. Eventually I found it the answer that worked for
me, a graphic designer with not much experience in xml.
The following url provided an errata file in PDF format:
www.peachpit.com/dwcs3cib
which includes the following addendum to the incomplete
instructions in the book i was using to learn about spry:
"If Internet Explorer 7 is your primary browser, you'll nee
to take some extra steps to view spry dynamic content locally.
First, your site must be within the local server webroot; be sure
your Lessons folder is stored within the Inetpub>wwwroot folder.
Next, double-click the site name in the files panel to open the
Site Definition dialogue. Click the Testing Server category; from
the Access List choose Local/Network. Click Okay to close the Site
Definition dialogue. Now, when you preview your page with Internet
Explorer, your local Web server (localhost) serves the page as
designed."
Horray for me! Now i can move on from here and actually get
some work done! -
Formatting tags in xml data set used for spry region
I am trying to put <p>,,,</p> tags in my xml data set but they cause the field to not load. For example I would like to create an xml file as follows:
<blog>
<blogentry>
<blogdate>Jan 2009</blogdate>
<blogtitle>January Blog</blogtitle>
<blogtext><p> this is a paragraph</p>
<p>and so is this</p>
</blogtext>
</blogentry>
</blog>
When I do this I don't get anything in the spry region. If I remove the <p>,</p> tabs it works.
Is there anyway to do this (not just with <p> but with any tags ... ie. tables, etc.).
Thanks/HalI have an online example:
http://www.pearlmanpr.com/perspective_test.html
The spBlog.xml file contains test junk. If I put the <[[CDATA....]]> inside the BlogEntry/BlogText tag it doesn't work at all.
http://www.pearlmanpr.com/perspective_test_2.html
If I use it without the <[[CDATA..]] it doesnt work either.
http://www.pearlmanpr.com/perspective_test_3.html
If I use it without any <> within the tag it sort of works (still needs to be aligned). -
Designing a 'sample time feed' for Spry XML Data Set
Hi!
Often when I call a Spry XML Data Set I find I can't get the
schema. If offers you the option to design a sample time feed but
doesn't give you enough info to be able to even guess how to do
this.
Is the answer in modifying that php line somehow?
Any guidance would be much appreciated!
MikeThe idea for Design Time XML is that you can use a static XML
file instead of a dynamic source, in case you don't have access to
the real data. You can use the Design Time XML to make the query
and design the page.
This gives you access to the data references for designing
the page.
If you are getting schema errors, the numbers that the dialog
shows is the line number and character number (1,1)
You should be able to see the XML directly in the browser. If
you can, then DW should be able to consume it. -
I have posted this over on the Spry forum but wonder if someone else has had a similar issue and found a solution as I am trying to find the answer to this quickly if possible; I want to use a tooltip with an xml data set.
I have an xml data set of events and within it there is a tooltip element. How can I get another element to act as a trigger so my tooltip appears when I mouseover the element?
My data set is displaying correctly. I'm trying to get the event title element to act as the trigger and the code that I have so far:
<div spry:region="eventsDS">
<table width="533">
<tr>
<th width="108" spry:sort="date">Date</th>
<th width="105" spry:sort="title">Title</th>
<th width="98" spry:sort="location">Location</th>
<th width="202" spry:sort="price">Price</th>
</tr>
<tr spry:repeat="eventsDS">
<td>{date}</td>
<td><a href="#tooltiptrigger">{title}</a></td>
<td>{location}</td>
<td>{price}</td>
</tr>
</table>
</div>
<div class="tooltipContent" id="sprytooltip" spry:detailregion="eventsDS">{tooltip}</div>
<p><a href="#top">back to top</a></p>
<script type="text/javascript">
var sprytooltip = new Spry.Widget.Tooltip("sprytooltip", "#tooltiptrigger");
</script>I see & chars in your xml, try wrapping it in <[CDATA[
]> tags like this:
<description> <[CDATA[Beer (B), Beer & Wine (BW)
or Beer, Wine & Liquor (BWL)<br />
Off sale only, no consumption on the licensed
premises]]></description>
Also if check out your xml in firefox, you will see that it
shows a parsing error, most likely caused by the issue i addressed
above. -
XML Data Set selection by attribute?
I am new to Spry and was trying to work with the XML Data Set
feature. I have an XML file with the schema listed below. I wanted
to know if it were possible to only grab the data from this XML
file if it matches a certain type? For example, grab data from
seminarType where @type="condition1"? Is this able to be done or
will I have to generate an XML file for each type? My goals was to
have one large file to grab data from.
<seminars>
<seminarType type="">
<seminarSession type="">
<seminar>
<location><![CDATA[]]></location>
<date></date>
<time></time>
<seats></seats>
<directions><![CDATA[]]></directions>
</seminar>
</seminarSession>
</seminarType>
</seminars>The seminar node contains all the information I want to grab.
I need to be able to select those nodes based off seminarType @type
and then seminarSession @type.
Example:
<seminars>
<seminarType type="type1">
<seminarSession type="session1">
<seminar>
<location><![CDATA[location]]></location>
<date>12-12-2007</date>
<time>14:00</time>
<seats>23</seats>
<directions><![CDATA[mapquest
directions]]></directions>
</seminar>
</seminarSession>
<seminarSession type="session2">
<seminar>
<location><![CDATA[location]]></location>
<date>10-08-2007</date>
<time>10:00</time>
<seats>15</seats>
<directions><![CDATA[mapquest
directions]]></directions>
</seminar>
</seminarSession>
</seminarType>
</seminars>
So I would want to grab all the session nodes where
seminarType @type="type1" and seminarSession @type="session1"
Does this help?
Maybe you are looking for
-
How to print text vertically in smart forms
hi, Can any one tell how to print text vertically in smartforms ADVANCE THANKS GUHAPRIYAN
-
Error while sending a message 501 not implemented
Hi all, running some tests checking some Xi interfaces we have the following problem : going to Runtime Workbench --> Component Monitoring --> Adapter Engine e clicking on the Tab "Test Message" we insert Service, Interface, Namespace, Quality of Ser
-
Can't Print Book from iPhoto or Preview, but Can Print from Adobe Accrobat
I have spent 2.5 hours on the phone with HP, an am now unsure if the problem is with HP or Apple. When I try to print a single page from an iPhoto Book (or a group of pages), I receive an error message on the HP 4650 printer (49.4C02). I saved the bo
-
Mac :: Firefox :: CSS border issue
Can someone with Firefox on a Mac check this page and see if you can tell why in the "products" boxes ( there are 3 ) .. the bottom border is missing on only 2 of them. I believe the 3rd box down renders the border. If I delete a paragraph from the 1
-
I cant restore a catalog because it says the file is empty
I BU my PSE 11 catalog but when I try to restore it it says it's empty. I can open the folder/files on my hard drive but the restore function says it is empty