Spry XML Q
I have a data grid which lists courses description etc. It
reads in the XML fine. What I was wondering is I have this one
column that shows the date or dates (multiple) for each class.
Would I just list these multiple dates like this:
<date>8/8/09 10/23/09 11/21/09</date> It looks
ok in the grid but is that correct? Maybe crazy Q, dunno.
Also how does Spry read or display XML attributes? DOes
anyone one have or know of any good Spry examples?
ANy help is appreciated.
It depends on what you want to do with the dates. If you are
only ever going to display them *as is* into the HTML then that is
fine. If you want/need to format them so that they are in a list,
or whatever, then I would look into formatting it either like this:
<date>8/8/09</date>
<date>10/23/09</date>
<date>11/21/09</date>
or wrapped within a dates tag:
<dates>
<date>8/8/09</date>
<date>10/23/09</date>
<date>11/21/09</date>
</dates>
and then look into the use of nested data sets:
http://labs.adobe.com/technologies/spry/samples/data_region/NestedXMLDataSample.html#Using NestedDataSets
--== Kin ==--
Similar Messages
-
Looking for more samples of spry xml data in use
I was curious if there's a resource out there that shows more
samples of using the spry xml data widget. Almost like a template
or sample gallery. Am I dreaming?Look
Here -
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 -
How to show an entry with specific ID from spry xml dataset?
I have a spry xml dataset, can I show only one record
specified by, say, unique ID?yeah, I first posted this one, then found out that my other
message was replied:) -
Spry xml dataset / IE / Phatfusion Multibox
I try to use spry xml data set with phatfusion multibox.
I use multibox script to open a PHP page with query string
insides spry:region.
It has problem on this application on IE either 6 and 7. But
works fine in Firefox
The requested php page just open in a new window.
I tested to relocate the dummy scripts for multibox outsides
spry:region, the script do works.
How to solve the problem ! Help pleaseHi bsyyu,
First, you might want to validate your markup because I see
that you have several unclosed tags and a missing title tag.
To solve the problem, you'll have to create your multibox
object inside an observer for the region.
Replace your code inside the region:
<script
type="text/javascript">
var ben = {};
window.addEvent('domready', function(){
ben = new MultiBox('mb', {descClassName: 'multiBoxDesc'});
</script>
with this code, put in a script in the page head:
var obs = new Object;
obs.onPostUpdate = function(notifier, data){
var ben = new MultiBox('mb', {descClassName:
'multiBoxDesc'});
Spry.Data.Region.addObserver('events', obs);
--Florin TUDOR -
Error specifying spry xml data source?
I have been using Dreamweaver's Spry XML Data Sets without any trouble until I added the calendar YUI widget. After that I get an error message "no expected entity name for reference (65, 23)". Also nothing shows in the Bindings Panel. I have a Mac OS X, which I find very frustrating after being on a PC for 15 years. I can never find anything I am looking for in the help section.
Here is what I have tried so far that has not worked.
1. Removed the YUI extension
2. Deleted the ******.dat file from the configuration folder in the library user folder
3. Renamed the configuration folder in the library user folder
4. Copied the configuration library folder from my functioning laptop
5. Uninstalled and reinstalled Dreamweaver CS4
I can code everything by hand, but that is very time consuming and makes this software a virtual paper weight.
I would appreciate any advise that could be offered.The preferences files for Mac programs is in your user account folder/Library/Preferences. The files that DW and other applications create end in .plist. These files are creating by Mac OS for many different applications. If you delete one, the OS will re-create another preferences file upon the next opening of the application.
Also the other files that DW saves during a re-install are saved only if you go through the uninstall process and enable that option. This is the same for the Windows version. Sometimes if there are strange errors you can contact Adobe support for general information.
If not and you need to do a re-install I would recommend de-activating first. Then running the adobe CS# clean tool. Just type that phrase into Google and you will find it as the top result for CS3 or CS4.
Adobe - Adobe CS3Clean Script
Adobe - Adobe CS4 Clean Script
Those do more than just remove the program. They will remove all components in the applications folder and shared in the user library and system library. That is the only true way to do a re-install as far as I know. But you will need to de-activate before doing this because it will erase every file and all serial numbers from all Adobe programs with this tool. -
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 xml datasets can't recognise images
Been trying all day to load a spry xml dataset with image
information into a table using the wizard. problem is, you can't
tell the wizard that the data in one of the columns is the path to
an image, so it sees it as a string and just sticks the path in the
table. I tried putting it in as html rather than string but really
I am firing into the dark here!
What have I missed?thanks for the reply. I found the issue in the path string,
along with having to edit the html tag directly, which I wasn't
expecting, being used to DW doing it all for me! I found a lot of
the answer here:
http://www.csupomona.edu/~llsoe/42101/css/sprytables.htm
At least it stopped me being scared of html! -
Currently when I try and add a SPRY XML Dataset and hit the Get Schema button I get "Unable to locate or parse the XML Source (-1,-1). I created the XML from the Export recordset to XML tool in the Developer Toolbox. I can't seem to figure out what I am missing. Anyone else having this problem as well. It use to work then I think my system did some update from Adobe and since has stopped working. Any assistance is greatly appreciated. Thanks.
Hello,
The error usually means that the XML source that you choose within Spry XML Data Set interface is not valid.
So you should check the XML source to see if it returns a valid XML.
Regards,
Ionut -
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. -
Spry XML Dataset Video Gallery Question
Hi there,
We are trying to create a video gallery using a Spry XML Dataset.
It's currently working in FF and Safari, but not working in IE6-7 or Opera.
Here is a link... http://www.rightsidedesign.com.au/test/tv.html
IE seems to display the content for a second, but it doesn't load the videos or text, but then it disappears.
The elements being fed via the dataset are the video, video description (at bottom right of video) and thumbnails
Can anyone give us a hint as to what we might be doing wrong??
We followed the tutorial at... http://www.coremediadesign.co.uk/web_design_tutorials/dreamweaver_tutorials/spry_image_gal lery_adobe.html
and replaced the image with an FLV player.
Thanks for your help in advance!Hi there,
We are trying to create a video gallery using a Spry XML Dataset.
It's currently working in FF and Safari, but not working in IE6-7 or Opera.
Here is a link... http://www.rightsidedesign.com.au/test/tv.html
IE seems to display the content for a second, but it doesn't load the videos or text, but then it disappears.
The elements being fed via the dataset are the video, video description (at bottom right of video) and thumbnails
Can anyone give us a hint as to what we might be doing wrong??
We followed the tutorial at... http://www.coremediadesign.co.uk/web_design_tutorials/dreamweaver_tutorials/spry_image_gal lery_adobe.html
and replaced the image with an FLV player.
Thanks for your help in advance! -
I have off and on looked at DV CS3. This is my first real
serious try. I want to setup “add a new user” from HTML
page with backend data located in MySQL.
The user data includes name, address, etc.
I understand it can be done with SPRY, XML, Java/JavaScripts
& MySQL. I am hoping that someone direct me to a tutorial so I
can get started.
Thanks.
SamI would post to the Spry Forum, it is usually very helpful:
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=602
Here are some other links that may be helpful:
http://livedocs.adobe.com/en_US/Spry/SDG/help.html?content=WS4D63E055-8F82-4401-93F7-BBA17 BC0249D.html
http://www.adobe.com/devnet/spry/
http://labs.adobe.com/technologies/spry/samples/ -
Spry xml dataset driven page and search engines
If a page uses Spry xml dataset to present products to a
visitor, what do google and yahoo crawlers see in that page?
I'm asking because i plan to rewrite our products' static
pages using spry xml dataset, and i'd like to ensure crawlers see
the products. I haven't looked much, yet, into this pry capability,
but the products page will most probably be paginated (not sure if
possible in this capability) since there are hundreds of products.
currently, our static html pages generated good conversions
into purchases from google and yahoo searches.
It would be great if there is a real-life website that uses
this spry capability and has their pages appear in those search
engines.
thanks.If a page uses Spry xml dataset to present products to a
visitor, what do google and yahoo crawlers see in that page?
search bot do not read / understand javascript. So they would
not index it.
Its a commen point of failure of the ajax techniques, Spry
has a handy solution for it (spry:content) wich will allow u to
overwrite 'content' if javascript is enabled so and bots will just
see the static page. -
Spry XML Data won't diplay - Help
Here is my code:
<!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>Untitled Document</title>
<style type="text/css">
<!--
#apDiv1 {
position:absolute;
left:8px;
top:27px;
width:266px;
height:115px;
z-index:1;
-->
</style>
<script language="JavaScript" src="SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="SpryAssets/SpryData.js"
type="text/javascript"></script>
<script type="text/javascript">
<!--
var dsEvent = new Spry.Data.XMLDataSet("events.xml",
"events/event");
//-->
</script>
</head>
<body>
<div id="apDiv1">
<div spry:region="dsEvent">
<table width="278" >
<tr>
<th>Name</th>
<th spry:sort="location">Location</th>
</tr>
<tr spry:repeat="dsEvent" spry:setrow="dsEvent">
<td>{name}{date}</td>
<td>{location}</td>
</tr>
</table>
</div>
</div>
</body>
</html>
Here is my problem:
If I use UNC path it display the data.
If I use IIS --- such as http:\\testServer\devhome\test.cfm
it will give me a blank white page. No xml data.
Can any one point me out what I am doing wrong?
Thanks in advance.Here is my new finding : After I changed ".cfm" to ".html"
--- it work's !!!!!!!!!!
My new question is why it is not working in coldfusion. I
tried in two diffrent server --- same result.
Need some help here.
Thanks in Advance. -
Spry xml data does not work in ie
Hello all,
I'm attempting to use a spry data set / xml. Works great in FF. I can't get it to function in IE. On my test machine, it will blink the html content without the xml data and then just disappear. No error. I've created a simple test page for trouble shooting. I'm using Spry version 1.6.1.
Can you please take a look and see if you can tell what I'm doing wrong? Thanks in advance.
Links to the test pages:
http://psstudios.com/clients/tesseract/caltest.htm
<meta http-equiv="Content-Type" content="text/xml; charset=UTF-8" />
http://psstudios.com/clients/tesseract/caltest1.htm
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
and the xml:
http://psstudios.com/clients/tesseract/tesseract_events.xml
http://psstudios.com/clients/tesseract/tesseract_news.xmlYour server is sending xml files with the content-type header text/plain. XML files should have the content-type text/xml. If you fix this, it would work. If you cannot change the server settings to serve the appropriate header see my post over at the Spry forums: http://forums.adobe.com/message/2179253#2179253
It might fixes the issue for you, but that still doesn't mean it would fix your server -
Hi all-
I'm new to using spry and xml, but not new to xhtml and layout, having said that. I'm trying to store file paths in my xml and parse that xml to repace <href> tags in an image map. For example (the actual cooridnates in the map are just made up for the example below, the actual map has 88 locations and very detailed coordinates, as it is a state map):
<head>
<script src="../SpryAssets/xpath.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryData.js" type="text/javascript"></script>
var ds1 = new Spry.Data.XMLDataSet("../files/research/counties_census.xml", "ohio");
</head>
<body>
<div spry:region="ds1">
<img src="../images/CountyMap.gif" width="565" height="611" usemap="#Map">
<map id="Map" name="Map">
<area shape="rect" coords="103,156,155,202" href="../files/research/{Location}" />
<area shape="rect" coords="216,156,286,210" href="../files/research/{OtherLocation}" />
</map>
</div>
</body>
Am I just making a syntax error or is this just outside the scope of what I can use spry for? Any help is appreciated.
thanks in advanceI have one more question. What you gave me worked like a charm btw. Thanks a lot. Onto the question:
I'd like to use the same XML to also power a drop down menu, here's a snippet of the XML/XHTML below. I can't seem to get it to work on the drop down, the image map works great.
XML snippet:
<locations>
<location>
<filepath>P1008.pdf</filepath>
<coords>192,496,193,497,194,497,195,497,196,497,197,497,199,497,201,497,201,498,202,498,2 01,498,201,499,202,499,203,500,204,500,204,501,205,502,206,502,206,503,207,503,207,504,207 ,506,207,510,207,511,207,512,207,514,207,518,207,521,207,522,207,524,207,525,207,526,207,5 27,207,528,207,529,207,530,207,531,207,532,207,533,207,535,207,537,207,538,207,539,207,540 ,207,541,207,542,207,543,207,545,207,547,207,548,207,549,207,550,206,552,206,554,206,555,2 06,556,206,558,206,559,206,560,206,562,206,563,206,564,206,565,206,566,206,567,206,568,206 ,569,206,570,206,571,205,571,205,572,204,572,204,573,203,573,203,574,203,573,202,573,201,5 73,201,572,200,572,200,571,200,570,199,570,199,569,199,568,199,567,198,566,197,566,197,565 ,196,565,196,564,195,564,194,564,194,563,193,563,192,563,192,562,191,562,190,562,189,562,1 88,562,187,562,186,562,186,561,187,561,186,561,185,561,184,561,183,561,182,561,182,560,181 ,560,180,560,179,559,178,558,177,557,176,557,176,556,175,556,174,556,174,555,173,555,172,5 55,171,556,169,556,168,556,168,557,167,557,166,557,165,557,164,557,164,558,163,558,162,558 ,161,558,160,559,159,559,159,560,158,560,158,561,158,562,158,563,157,563,157,564,157,565,1 57,566,156,567,155,567,155,568,154,568,153,568,153,567,152,567,151,567,150,566,149,566,149 ,565,149,564,149,563,149,562,149,561,149,560,149,559,149,558,149,557,149,555,150,555,150,5 54,150,553,150,552,150,551,150,549,150,548,150,547,150,546,150,545,150,544,151,543,151,541 ,151,540,151,538,151,537,151,536,151,534,151,532,152,531,152,530,152,529,152,528,152,527,1 52,526,152,525,152,523,152,522,152,521,152,520,152,519,153,519,153,518,153,517,153,516,153 ,515,153,514,153,513,153,512,153,510,153,508,153,507,154,506,154,505,154,504,154,503,154,5 02,155,502,156,502,159,502,160,502,161,502,162,502,163,502,164,502,165,502,165,501,166,501 ,167,501,168,501,169,501,170,501,170,500,171,500,172,500,173,500,174,500,175,500,175,499,1 76,499,177,499,178,499,179,499,180,499,180,498,182,498,184,498,188,497,189,497,190,497,191 ,497</coords>
<county>Adams County</county>
</location>
<location>
<filepath>P1009.pdf</filepath>
<coords>132,183,132,184,132,185,132,186,132,187,132,188,132,189,132,190,132,192,132,194,1 31,195,131,196,131,197,131,199,131,201,131,202,131,203,131,204,131,206,131,207,131,208,131 ,209,131,210,131,211,131,212,131,213,131,214,131,216,131,217,131,218,131,219,131,220,131,2 21,131,223,131,224,131,225,131,226,131,227,131,228,131,229,130,229,129,229,126,229,125,229 ,124,229,123,229,122,229,119,229,118,229,117,229,116,229,114,229,113,229,112,229,111,229,1 10,229,109,229,108,229,107,229,106,229,105,229,104,229,102,229,102,227,102,226,100,226,99, 226,98,226,97,226,96,226,95,226,92,226,90,226,89,226,87,226,87,225,87,224,87,222,87,221,85 ,221,84,221,83,221,82,221,81,221,80,221,78,221,77,221,76,221,75,221,72,221,71,221,69,221,6 8,221,65,221,65,220,65,219,65,218,65,217,65,216,65,215,65,214,65,212,65,211,65,210,65,209, 65,207,65,206,65,205,65,204,65,203,65,201,65,200,65,199,66,199,67,199,68,199,70,199,71,199 ,72,199,73,199,73,197,73,196,73,195,73,194,73,193,73,192,74,192,75,192,76,192,77,192,79,19 2,80,192,81,192,82,192,83,192,84,192,85,192,86,192,87,192,88,192,90,192,91,192,92,192,95,1 92,99,192,100,192,101,192,102,192,102,191,102,190,102,188,102,187,102,186,102,185,105,185, 106,185,107,185,108,185,109,185,110,185,111,185,113,185,114,185,115,185,116,185,117,185,11 7,184,117,183,117,182,118,182,119,182,120,182,121,182,122,182,123,182,124,182,125,182,126, 182,127,182,128,182,129,183</coords>
<county>Allen County</county>
</location>
</locations>
Here's my XHTML:
<div spry:region="ds1">
<p>Click on a county, or select from the following:
<select onchange="jumpMenu(this)" name="menu1">
<option spry:repeat="ds1" value="../files/research/{filepath}">{county}</option>
</select>
</p>
</div>
<div spry:region="ds1"> <img src="../images/OhioCountyMap.gif" usemap="#Map">
<map id="Map" name="Map">
<area spry:repeat="ds1" shape="poly" coords="{coords}" href="../files/research/{filepath}">
</map>
</div>
Maybe you are looking for
-
Help me delete my emails, please
Hello everybody - hope someone can help me. Up until recently I had two ways to check my emails: my computer at home Outlook Express, and when away, I went into BT Yahoo on other computers. Now my daughter has bought me an iPad which is great BUT the
-
Had a question on manipulating images
I was wondering if someone could help. I had an idea of loading an image of an office on the iphone and then somehow programming different parts of that image like a book on the table or a trash can such that when u scroll over the book or trash can
-
Hi I have already asked this question about creating gift certificates and someone very kindly gave me a php script. Does anyone know of a javascript or a jquery script and instructions on how to create a gift certificate. I am using DR CS3 and I a
-
[SOLVED] eth0-wlan0 AP using bridge AND keep internet access
Hi there! This is my very first post here, so please forgive me if I (unintentionally) violate some rule. I have set up my system as an eth0-wlan0 access point with hostapd using a bridge. The IP addresses are provided by a separate dhcp-server (rout
-
Experiencing poor syndication service performance in MDM SP06
I have installed MDM SP06 on our test server and have had to switch our syndications from using the syndication manager batch utility to using the syndication service. These syndications all have the "suppress unchanged records" option selected (chec