Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SPRY Repeating Region with CATEGORIES

New Here ,
Feb 24, 2008 Feb 24, 2008
I have a seemingly simple but apparently complex issue with the Spry DataSet and Spry repeating region use that my many hours of research has not yielded an answer to, or even if it's possible. I want to parse the XML dataset to have a categorization of data like so:

Office Location
::Employee
::Employee
Office Location
::Employee
Office Location
::Employee
::Employee
::Employee
...

Using the XML path, I can list all the locations (having special formatting for the "Location Banner", or I can list all the employees, but not BOTH using the DataStore.

Here is an example of my XML:

<?xml version="1.0" encoding="UTF-8"?>
<Company>
<Location>
<LocName>Location 1</LocName>
<BannerImg>loc1.jpg</BannerImg>
<Employee>
<Image>EMP1</Image>
<Name>Jane Doe</Name>
<Bio>No Bio </Bio>
</Employee>
<Employee>
<Image>EMP43</Image>
<Name>John Smith</Name>
<Bio>Worked for Company X since 1980</Bio>
</Employee>
</Location>

<Location>
<BannerImg>Location9.jpg</BannerImg>
<LocName>Springfield Office</LocName>
<Employee>
<Image>Emp76</Image>>
<Name>John Public</Name>
<Bio>Worked for us since 1998</Bio>
</Employee>
</Location>
</Company>
###########

Without Hard-coding each location in and having a different DS for each, how do I make that look like THIS:

Location 1 [PHOTO]
[Photo] Jane Doe: No Bio
[Photo] John Smith: Worked for Company X since 1980
Springfield Office [PHOTO]
[Photo] John Public:Worked for us since 1998

???

This might be simple, or it might be an additional level of programming, or even using a different parsing tool, but I really want to have this work. Thanks for your help.

-Travis
TOPICS
Extensions
334
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 24, 2008 Feb 24, 2008
LATEST
Hi Travis:
I think nested DataSets is what you are looking for:
http://labs.adobe.com/technologies/spry/samples/data_region/NestedXMLDataSample.html#UsingNestedData...

HTH,
Andres Cayon
Spain Adobe Dreamweaver User Group
http://www.dwug.es
----------------------


"OssipMIS" <webforumsuser@macromedia.com> escribió en el mensaje de noticias
news:fps0gd$7h4$1@forums.macromedia.com...
>I have a seemingly simple but apparently complex issue with the Spry
>DataSet
> and Spry repeating region use that my many hours of research has not
> yielded an
> answer to, or even if it's possible. I want to parse the XML dataset to
> have
> a categorization of data like so:
>
> Office Location
> ::Employee
> ::Employee
> Office Location
> ::Employee
> Office Location
> ::Employee
> ::Employee
> ::Employee
> ...
>
> Using the XML path, I can list all the locations (having special
> formatting
> for the "Location Banner", or I can list all the employees, but not BOTH
> using
> the DataStore.
>
> Here is an example of my XML:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Company>
> <Location>
> <LocName>Location 1</LocName>
> <BannerImg>loc1.jpg</BannerImg>
> <Employee>
> <Image>EMP1</Image>
> <Name>Jane Doe</Name>
> <Bio>No Bio </Bio>
> </Employee>
> <Employee>
> <Image>EMP43</Image>
> <Name>John Smith</Name>
> <Bio>Worked for Company X since 1980</Bio>
> </Employee>
> </Location>
>
> <Location>
> <BannerImg>Location9.jpg</BannerImg>
> <LocName>Springfield Office</LocName>
> <Employee>
> <Image>Emp76</Image>>
> <Name>John Public</Name>
> <Bio>Worked for us since 1998</Bio>
> </Employee>
> </Location>
> </Company>
> ###########
>
> Without Hard-coding each location in and having a different DS for each,
> how
> do I make that look like THIS:
>
> Location 1 [PHOTO]
> [Photo] Jane Doe: No Bio
> [Photo] John Smith: Worked for Company X since 1980
> Springfield Office [PHOTO]
> [Photo] John Public:Worked for us since 1998
>
> ???
>
> This might be simple, or it might be an additional level of programming,
> or
> even using a different parsing tool, but I really want to have this work.
> Thanks for your help.
>
> -Travis
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines