Spry XPath question

This is a multi-part message in MIME format.
------=_NextPart_000_00F9_01C6872E.F574B670
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have an XML file which describes vacation listings. It is
divided into =
major locations (in the code below, U.S. and Mexico) which,
in turn, =
include property listings and details. I've gotten it to work
in a basic =
master-detail page, but only by ignoring the major locations.
(In my =
data set creation code, the XPath expression points to =
"vacations/location/property"). What I'd really like is to do
something =
like this following:
Region Location Property
US Florida Vista Hills
Vancouver Northern Palace
Mexico Cancun Playa de Picante
Would I need two data sets to pull this off?
Best - Joe
<?xml version=3D"1.0" encoding=3D"iso-8859-1"?>
<vacations>
<location>
<place>U.S.</place>
<property>
<name>Vista Hills</name>
<destination>Florida</destination>
<contact>407-555-1234</contact>
<description>The perfect family vacation resort, near
all area =
amusement parks.</description>
<image>vista_hills.jpg</image>
</property>
<property>
<name>Northern Palace</name>
<destination>Vancouver</destination>
<contact>407-555-5678</contact>
<description>Enjoy great shopping and whale watching
in the ultimate =
stylish setting.</description>
<image>northern_palace.jpg</image>
</property>
</location>
<location>
<place>Mexico</place>
<property>
<name>Playa de Picante</name>
<destination>Cancun</destination>
<contact>+52-998-555-1234</contact>
<description>Fun in the sun to the max - don't miss
the vacation of a =
lifetime.</description>
<image>picante.jpg</image>
</property>
</location>
</vacations>
------=_NextPart_000_00F9_01C6872E.F574B670
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2873"
name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I have an XML
file which describes =
vacation=20
listings. It is divided into major locations (in the
code below, =
U.S. and=20
Mexico) which, in turn, include property listings and
details. I've =
gotten it to=20
work in a basic master-detail page, but only by ignoring the
major =
locations.=20
(In my data set creation code, the XPath expression points to
"<SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Arial;
=
mso-fareast-font-family: 'Times New Roman';
mso-bidi-font-family: 'Times =
New Roman'; mso-ansi-language: EN-US; mso-fareast-language:
EN-US; =
mso-bidi-language:
AR-SA">vacations/location/property</SPAN>").=20
What I'd really like is to do something like this =
following:</FONT></DIV>
<DIV><FONT face=3DArial
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2><U>Region        Locatio=
n       =20
Property</U></FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>US          &n=
bsp;  =20
Florida        
 Vista=20
Hills</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>          &nbs=
p;       =20
Vancouver    Northern
Palace</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>Mexico       =20
Cancun         Playa
de=20
Picante</FONT></DIV>
<DIV><FONT face=3DArial
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Would I need two
data sets to pull this =
off?</FONT></DIV>
<DIV><FONT face=3DArial
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Best -
Joe</FONT></DIV>
<DIV><FONT face=3DArial
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New"
size=3D2>&lt;?xml version=3D"1.0"=20
encoding=3D"iso-8859-1"?&gt;<BR>&lt;vacations&gt;<BR>&lt;location&gt;<BR>=
 &lt;place&gt;U.S.&lt;/place&gt;<BR> &lt;property&gt;<BR> =
 &lt;name&gt;Vista=20
Hills&lt;/name&gt;<BR>  &lt;destination&gt;Florida&lt;/destinat=
ion&gt;<BR>  &lt;contact&gt;407-555-1234&lt;/contact&gt;<BR>&nb=
sp; &lt;description&gt;The=20
perfect family vacation resort, near all area amusement=20
parks.&lt;/description&gt;<BR>  &lt;image&gt;vista_hills.jpg&lt=
;/image&gt;<BR> &lt;/property&gt;<BR> &lt;property&gt;<BR>&nbsp=
; &lt;name&gt;Northern=20
Palace&lt;/name&gt;<BR>  &lt;destination&gt;Vancouver&lt;/desti=
nation&gt;<BR>  &lt;contact&gt;407-555-5678&lt;/contact&gt;<BR>=
  &lt;description&gt;Enjoy=20
great shopping and whale watching in the ultimate stylish=20
setting.&lt;/description&gt;<BR>  &lt;image&gt;northern_palace.=
jpg&lt;/image&gt;<BR> &lt;/property&gt;<BR>&lt;/location&gt;<BR>&lt;=
location&gt;<BR> &lt;place&gt;Mexico&lt;/place&gt;<BR> &lt;prop=
erty&gt;<BR>  &lt;name&gt;Playa=20
de=20
Picante&lt;/name&gt;<BR>  &lt;destination&gt;Cancun&lt;/destina=
tion&gt;<BR>  &lt;contact&gt;+52-998-555-1234&lt;/contact&gt;<B=
R>  &lt;description&gt;Fun=20
in the sun to the max - don't miss the vacation of a=20
lifetime.&lt;/description&gt;<BR>  &lt;image&gt;picante.jpg&lt;=
/image&gt;<BR> &lt;/property&gt;<BR>&lt;/location&gt;<BR>&lt;/vacati=
ons&gt;</FONT></DIV></BODY></HTML>
------=_NextPart_000_00F9_01C6872E.F574B670--

Thanks, Kin -
I figured out how to create the two data sets as you
described, but was
looking for the single list solution with nested repeating
nodes.
Looking forward to your solution!
Best - Joe
"kinblas" <[email protected]> wrote in
message
news:e62dkj$qun$[email protected]..
> Hi Joe,
>
> If you are trying to display the info for "place",
"name" and
> "destination"
> all in one table or list we can't handle that at the
moment due to the way
> we
> flatten the XML into a data set. Repeating nodes
underneath repeating
> nodes get
> discarded.
>
> We're working on a solution though.
>
> We can handle your XML structure with a Master/Detail
pattern though.
>
> var dsPlaces = new XMLDataSet("location.xml",
> "/vacations/location/place");
> var dsProperties = new XMLDataSet("location.xml",
> "/vacations/location[place =
> '{dsPlaces::place}']/property");
>
> Using data sets like the above would assume that you'd
have a place for
> users
> to click on a list of places and the detail area would
display the
> properties
> for the currently selected place.
>
> --== Kin ==--
>

Similar Messages

  • XML/XPath question--how to select a range of elements with XPath?

    Hi there,
    I have an XML DOM in memory. I need to do hold it and issue only parts of it to my client app in "pages". Each page would be a self-contained XML doc, but would be a subset of the original doc. So for instance the first page is top-level elements 1-5. 2nd page would be 6-10 etc. Is this solution best solved with XPath? If not, what's the best way? If so, I have the following question:
    Is there a way to use XPath to select a range of nodes based on position within the document? I know I can do an XPath query that will return a single Node based on position. So for example if I wanted the first node in some XML Book Catalog I could do XPathAPI.selectSingleNode(doc, "/Catalog/Book[position()=1]"); I could wrap the previous call in a loop, replacing the numeric literal each time, but that seems horribly inefficient.
    Any ideas? Thanks much in advance!
    Toby Buckley

    Your question is about marking a range of cells. 99% of the code posted has nothing to do with this. If you want to create a simple table for test purposes then just do:
    JTable table = new JTable(10, 5);
    JScrollPane scrollPane = new JScrollPane( table );
    getContentPane().add( scrollPane );
    In three line of code you have a simple demo program.
    When I leave the mouse button again, these bunch/range of cells shall stay "marked". table.setCellSelectionEnabled( true );
    and I'd like to obtain, say, a vector of a vector containing just those data marked beforeUse the getSelectedRows() and getSelectedColumns() methods for this information. I would suggest you create a Point object to reflect the row/column position and then add the point to an ArrayList.

  • XPath question

    I am trying to populate an accordion using an XML document as
    follows:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <images xmlns="
    http://www.g-raff.com/images">
    <groups>
    <group groupname="Martyn's favourites">
    <image>
    <filename>atomic-kitten-1.jpg</filename>
    <title>Atomic Kitten</title>
    <date>23.8.2004</date>
    <place>London</place>
    </image>
    <image>... </image>
    etc.
    </group>
    <group groupname="Painting with light">
    <image>
    <filename>a.jpg</filename>
    <title>a</title>
    <date>15.4.2003</date>
    <place>peckham rye</place>
    </image>
    etc.
    </group>
    <group groupname="Musicians">
    <image>
    <filename>atomic-kitten-1.jpg</filename>
    <title>Atomic Kitten</title>
    <date>23.8.2004</date>
    <place>London</place>
    <target>people1</target>
    </image>
    etc.
    </group>
    </groups>
    </images>
    Now - in creating the data sets, I want to generate a set of
    thumbnails for each "group" - I have the following code:
    var dsGroups = new Spry.Data.XMLDataSet("images.xml",
    "/images/groups/group");
    var dsImages = new Spry.Data.XMLDataSet("images.xml",
    "/images/groups/group[@groupname =
    '{dsGroups::@groupname}']/image")
    I am then using the following to label the accordion and
    populate the panels:
    <div id="NavAcc" class="Accordion" spry:region="dsGroups
    dsImages">
    <div class="AccordionPanel" spry:repeat="dsGroups">
    <div class="AccordionPanelLabel">
    <h3>{dsGroups::@groupname}</h3>
    </div>
    <div class="AccordionPanelContent">
    <div id="thumbs">
    <div class="thumbnail" spry:repeat="dsImages">
    <img class="thumb"
    src="images/thumbnails/{dsImages::filename}"
    alt="{dsImages::title}"
    onclick="dsImages.setCurrentRow('{ds_RowID}');" width="92"
    height="60" />
    <p class="caption">{dsImages::title}</p>
    </div>
    </div>
    </div>
    </div>
    </div>
    Its not working - dsImages is failing. I know it must be to
    do with the way I'm trying to filter by the attribute "groupname",
    as I'm not sure whether the "@" is allowed in this context.
    Can anyone point me at a fulfilling explanation of xPath
    syntax so I can figure out how to achieve this?
    Thanks yet again,
    raff J

    I encountered the same (or very similar) problem. In my case,
    with a photo album xml where the layout is similar (see below) and
    I need to pull the image folder url from the parent dataset and the
    image urls from a series of <img> tags. I also could not
    figure out a way to do this, and would very much appreciate an
    example of how it is done.
    what did not work was setting up the datasets as
    var dsPhotos = new Spry.Data.XMLDataSet("sample.xml",
    "gallery/album")
    var dsImages = new Spry.Data.XMLDataSet("sample.xml",
    "gallery/album[@pID = '{dsPhotos::pID}']/img")
    Sample XML:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- XML Generated by SlpIDeShowPro Director v1.0.2 -->
    <gallery>
    <album pID="8" title="Rose River" description="Rose River
    Hike" lgPath="
    http://www.zakar.com/ssp_director/albums/RoseRiver/lg/"
    tnPath="
    http://www.zakar.com/ssp_director/albums/RoseRiver/tn/"
    tn="
    http://www.zakar.com/ssp_director/albums/RoseRiver/tn/P5030196.jpg">
    <img src="P5030211.jpg" title="" caption="P5030211.jpg"
    link="
    http://" />
    <img src="P5030196.jpg" title="" caption="P5030196.jpg"
    link="
    http://" />
    <img src="P5030197.jpg" title="" caption="P5030197.jpg"
    link="
    http://" />
    </album>
    <album pID="9" title="Stony Man / Little Stony Man
    Cliffs" description="Great views " lgPath="
    http://www.zakar.com/ssp_director/albums/Stonyman/lg/"
    tnPath="
    http://www.zakar.com/ssp_director/albums/Stonyman/tn/"
    tn="
    http://www.zakar.com/ssp_director/albums/Stonyman/tn/P5020182.jpg">
    <img src="P5020195.jpg" title="" caption="P5020195.jpg"
    link="
    http://" />
    <img src="P5020178.jpg" title="" caption="P5020178.jpg"
    link="
    http://" />
    <img src="P5020179.jpg" title="" caption="P5020179.jpg"
    link="
    http://" />
    </album>
    </gallery>

  • Spry Tab question

    I've got the use of the spry tab figured out, but what I'd like to know is if I can change the 'look' of the tabs.  Rather than just have them be plain ol' squares, I'd like to change the style of them (more than just the color).  Is it possible to change the shapes?  Or to specify a .jpg to use as the tab?
    Thanks!

    I appreciate all the feedback, but I have a few more questions...
    I want to do something like the example I've provided, but have two questions in that regard.
    The 1st - those tabs overlap.  Is their an easy way to accomplish that, as a newbie?  I don't know much, still learning.  Obviously it would be easier to create tabs that don't overlap and avoid this issue altogether, but I really like the look.
    My 2nd question is the drop shadow.  I can create the drop shadow in Photoshop, but I'm wondering if there's an easier way to do it in Dreamweaver.  Just apply the Spry Tab Menu and tell it to put a drop shadow behind it.  Is there something that easy, or do I need to create the drop shadow in Photoshop and use div tags to basically put it 'around' the spry tab menu?  Does that even make sense?  I know what I mean in my head, but might not be explaining it properly...

  • Spry link Question

    I have a spry menu which one of the main menus looks like this
    <li><a href="*" class="MenuBarItemSubmenu">PORTFOLIO</a>
              <ul>
                <li><a href="staticdesigns.html">STATIC</a></li>
                <li><a href="flashdesigns.html">FLASH</a></li>
                <li><a href="banners.html">BANNERS - RICH MEDIA</a></li>
            </ul>
    this code presently has a * for the PORTFOLIO link
    i need to know how can I make the PORTFOLIO not have a link and just work with a mouseover so I get the hover but just the <li> items have links?
    Oi tried to remove the href= but then I lose the text in the css sheet.
    any help?
    rd

    If your question is your main menu item is PORTFOLIO and you do not want it linked to another URL then use the default notation as follows:
         <li><a class="MenuBarItemSubmenu" href="#"> PORTFOLIO</a></li>

  • Spry XML question

    can spry read in XML as a string? I have an xml page
    generated by a coldfusion query (.cfm) The page parses correctly as
    an XML file, but when spry reads it in, it does not read it as XML.
    I can save the .cfm results (view source) as an XML file and it
    views perfectly through spry. Wondering if there is a way to do
    this with the original cfm file. NOTE: the example linked
    here
    does not work

    I use CF to generate XML all the time.
    You have to make sure you set the content-type to XML and
    make sure to remove whitespace:
    http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html
    But to answer your questions: yes, Spry can read XML strings:
    http://labs.adobe.com/technologies/spry/samples/data_region/XMLStringSample.html
    Hope this helps.
    Don

  • CS3 Spry css question

    I know basic tableless css, my question is instead of a regular navigation bar I need to use the spry widget for a dropdown navigation bar on an exisitng html page. I'm able to insert the spry in the correct spot on the .html page and get it to work but I have a css sheet already attached to the page I need to know if I can just select all the css from the spry css page and insert it inside my attached css page?
    Any help?

    Yes, you can move the styles, but in my opinion, it is safer to maintain the Spry CSS assets in their own file, safe from inadvertent deletion or harm. There is an inherent logic to the order of styles in the Spry CSS sheets, and you might lose the wisdom of the comments not to mention the orderly consistency as well.
    You may link many style sheets to your .html pages...you are not limited to one per page.
    By using several CSS files attached to one page, you can also have a separate style sheet for different media: one for the Screen, one for Print, one for a Handheld device. There's no reasonable way to keep all these varying uses for different style sheets all one ONE sheet. The Printer will look for your main style sheet AND at the overriding styles in the print style sheet, for instance, so you don't need to print the nav bar when what you want is a print of the content.
    Z
    You do, of course, need to NAME the CSS files with distinct names, for instance, global.css, print.css, handheld.css.
    Message was edited by: Zabeth69

  • CS5 Spry Menu Question

    Aloha,
    I have the menu configured that way i want it, but for the life of me I cant figure out how to do the following.
    I have a menu   home, about, contact etc.........  The menu bar has two background images, one when you load the page and then the mouse over image. What i want to do is when your on the index.html page , the Menu link will be lite up in my case (blue)  and then if you go off of that page the blue will go to the current page that is up on your screen.
    I am not great with code, I have spent a few hours tring to figure it out, i have no idea if it can do that or not, but its prob super easy, I just dont know what setting i am looking for.
    2ns Question.. Is there a way to make the Spry menu to look like this?    HOME    |   ABOUT     |      ETC
    Right now i dont have the | in there, not sure if its possable
    Aloha!

    Thank you for posting your URL, this should be done as a matter of course.
    You do need to have SpryDOMUtils.js uploaded to your SpryAssets folder for the script to work.
    The following explains the working of the script
    function InitPage(){
    Spry.$$('#MenuBar1 li').forEach(function(node){ // check each li within a region with an ID of MenuBar1
        var a=node.getElementsByTagName("a")[0]; // finds all a elements inside the li, but we only want the first so [0]
        if(a.href == window.location){ // if the href is the same as the current window location e.g. index.html
            Spry.Utils.addClassName(node,"activeMenuItem"); // add a class called activeMenuItem
    As soon as a class is added, CSS will take care of the styling. In the case that I have suggested, the CSS merely changes the background colour. This could just as happily be a background image.
    If you want a different image for each menu item, then assign a class to the menu item as in
    <li><a href="index.html">Home</a></li>
    <li><a href="home-services.html" class="red">Home Services</a></li>
    <li><a href="business-services.html">Business Services</a></li>
    <li><a href="web-hosting.html">Web Hosting</a></li>
    <li><a href="online-backup.html">Online Backup</a></li>
    <li><a href="about-us.html">About Us</a></li>
    <li><a href="contact.html">Contact Us</a></li>
    The style rule could then be
    .red .activeMenuItem {  background: url(home-button.png); }
    Cheers,
    Gramps

  • Spry Effects questions

    I have two (2) questions about using the Spry Effects script in a horizontal slide configuration.
    Question 1:
    In DW CS4 if I add the command <duration: 500,> the numerals turn red.  I also get an error in line ???? from DW which is the line the variable is on.  If I go ahead and accept the change I see the desired quicker slide in Firefox and Safari.  The default is 1,000 milliseconds so I am cutting it in half.  But!  In Internet Explorer 7 the script locks the browser window up.  Even if I revert to the saved HTML and JS files the problem still persists.  This problem also occurs if I set the duration higher than 1,000 milliseconds.
    This also happens if I upload the files to the Internet.  I was forced to redo the line in question and copy my saved SpryEffects.js over to my working directory.  This unlocked the file in Internet Explorer 7.  Any suggestions on how to get the quicker response time in Internet Explorer 7?
    Question 2:
    In Firefox I get a border around the button that enacts the Spry Effect.  I set the text decoration to "none" for both of the IDs for the images.  This thin line does not appear in Internet Explorer 7 or Safari 4.0.3.  My version of Firefox is version 3.5.3.
    The file can be viewed here.
    Thank you in advance.

    I have also found that the Spry works better in FireFox than
    IE7, when it comes to video
    http://www.catholicmemphis.com/catholicmensconference.html
    Check out this page and you will see that the Spry tabbed
    menu stops the video in FireFox but not in Explorer. I have seen
    this type of problem in a few forums, but know one gives an answer
    to those looking for solutions....

  • Simple spry menu question

    Hi
    I just need to know how to change the height of my spry menu.
    i did it once before but forgot how to. i think i've tried height
    on every SpryMenuBarHorizontal.css that is there there...
    Thanks

    Great thank you very much, added the code and its working
    now...
    Just one more question, hope this makes sense: I want to put
    the menu along a line that is the same color as the menu so i put
    to menu into a table and used a color background, is this the best
    way to do it? The problem i am having is that the table has this
    padding that i can't get rid of, i want it the same size as the
    menu, but i can make the table any smaller...
    Appreciate the help

  • Spry MenuBar Question

    Hi I'm creating a hobby-related website using Dreamweaver CS3, and I've got it set up to use a Spry menubar for navigation.  The Spry menu itself works great-- I'm not having any issues with the actual formatting or functioning of the menu bar.
    My question has to do with making changes to the menus and submenus.  (I'm still not fully decided on the overall structure of the menu and I know I'll be expanding athe menu options even after the site goes public.)    I know *how* to make those on a page by page basis-- either by using the menu bar panel or just editing the code directly.  That's easy enough.
    But here's the thing--  when I make a change to the text/structure/labels of on the menubar I want to change it sitewide, not just one individual page.
    It's a pain to have to cut and paste that change I've just made onto every other page in the site (or even to use the search and replace function to do it.)   It seems to me that there ought to be a way that I could have the menu code info that's currently indicated on each page (see below) stored in some external file rather than on each individual page, so that whenever I wanted to update the menubar sitewide, I only needed to make a change in *ONE* location .
    That's got to be possible, right?  But how do I do it?

    P.S.
    Here's the menubar code info that currently appears on each individual page of the site-- and which currently has to be updated on every page, any time I  make a change.  There's surely got to be a way I can have this located in an external file, so that I can make changes in just one location rather than on each page? 
    <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="intro_home.html" class="MenuBarItemSubmenu">Intro</a>
              <ul>
                <li><a href="intro_home.html">Intro / Home</a></li>
                <li><a href="intro_bw.html">About BW</a> </li>
                <li><a href="intro_harn.html">About H&acirc;rn</a></li>
                <li><a href="intro_who_are_we.html">Who Are We?</a></li>
              </ul>
          </li>
          <li><a href="general_overview.html" class="MenuBarItemSubmenu">General</a>
              <ul>
                <li><a href="general_overview.html">Overview</a></li>
                <li><a href="general_traits_intro.html" class="MenuBarItemSubmenu">Traits</a>
                    <ul>
                      <li><a href="general_traits_intro.html">Intro</a></li>
                      <li><a href="general_traits_harnic.html">H&acirc;rnic</a></li>
                      <li><a href="general_traits_jarin_ivinian.html">Jarin &amp; Ivinian</a></li>
                      <li><a href="general_traits_barbarians.html">Barbarian</a></li>
                      </ul>
                </li>
                <li><a href="general_affiliations.html">Affiliations</a></li>
                <li><a href="general_skills.html">Skills</a></li>
                <li><a href="general_prices.html">Prices</a></li>
              </ul>
          </li>
          <li><a href="lifepaths_intro.html" class="MenuBarItemSubmenu">Lifepaths</a>
              <ul>
                <li><a href="lifepaths_intro.html">Overview</a></li>
                <li><a href="lifepaths_guilds_intro.html" class="MenuBarItemSubmenu">Guilds</a>
                    <ul>
                      <li><a href="lifepaths_guilds_intro.html">Guilds Intro</a></li>
                      <li><a href="lifepaths_guilds_lps-by-guild.html">Guild LP List</a></li>
                      <li><a href="lifepaths_guilds_new-lps.html">New Lifepaths</a></li>
                    </ul>
                </li>
                <li><a href="lifepaths_churches.html">Churches</a> </li>
                <li><a href="lifepaths_ivinian.html">Ivinian</a></li>
                <li><a href="lifepaths_thardic.html">Thardic</a></li>
                <li><a href="lifepaths_tribal.html">Tribal </a> </li>
                <li><a href="lifepaths_non-human.html">Non-Human</a></li>
            </ul>
          </li>
          <li><a class="MenuBarItemSubmenu" href="magic_intro.html">Magic</a>
              <ul>
                <li><a href="magic_intro.html">Overview</a></li>
                <li><a href="magic_shek-pvar.html">Shek-P'var</a>            </li>
                <li><a href="magic_alchemy.html">Alchemy</a></li>
                <li><a href="magic_talents.html">Talents</a></li>
                </ul>
          </li>
          <li><a href="religion_intro.html" class="MenuBarItemSubmenu">Religion</a>
              <ul>
                <li><a href="religion_intro.html">Overview</a></li>
                <li><a href="religion_faith_general.html" class="MenuBarItemSubmenu">Faith</a>
                    <ul>
                      <li><a href="religion_faith_general.html">About Faith</a></li>
                      <li><a href="religion_the_gods.html">The Gods</a></li>
                      <li><a href="religion_faith_ritual_languages.html">Ritual Languages</a></li>
                    </ul>
                </li>
                <li><a href="religion_spirit_binding.html">Spirit Binding</a></li>
              </ul>
          </li>
          <li><a href="bestiary_intro.html" class="MenuBarItemSubmenu">Bestiary</a>
              <ul>
                <li><a href="bestiary_intro.html">Overview</a></li>
                <li><a href="bestiary_ivashu_general.html" class="MenuBarItemSubmenu">Ivashu</a>
                    <ul>
                      <li><a href="bestiary_ivashu_general.html">About Ivashu</a></li>
                      <li><a href="bestiary_ivashu_aklash.html">Aklash</a></li>
                      <li><a href="bestiary_ivashu_hru.html">Hru</a></li>
                      <li><a href="bestiary_ivashu_nolah.html">Nolah</a></li>
                      <li><a href="bestiary_ivashu_umbathri.html">Umbathri</a></li>
                      <li><a href="bestiary_ivashu_vlasta.html">Vlasta</a></li>
                    </ul>
                </li>
                <li><a href="bestiary_other_creatures.html">Other Creatures</a></li>
              </ul>
          </li>
          <li><a href="other_index.html" class="MenuBarItemSubmenu">Other</a>
              <ul>
                <li><a href="other_earthmasters.html">Earthmasters</a></li>
              </ul>
          </li>
          <li><a href="advice.html">Advice</a></li>
        </ul>

  • Newbie alert spry conditions question

    I am trying to use an XML dataset to draw data for my
    application pages. I have some XML fields, (in this case {helpurl}
    and {moreinfo} ) which may or may not have a value assigned to them
    in each record.
    My question is simple, but I can't find the answer... where I
    originally would write it this way in CF, what is the equivalent in
    CS3/Spry?
    <cfif (#helpurl# is not "")>
    <a href="#helpurl#">HELP</a>
    </cfif>
    <cfif (#moreinfo# is not "")>
    <a href="#moreinfo#">MORE INFORMATION</a>
    Thanks so much!!

    You need to use Spry:if like below
    <p> {Description} <a href="{Link}" target="_blank"
    spry:if="'{Link}' != ''">MORE..</a></p>
    Regards
    Phil

  • Problem with getNodeValue() - simple Java XPath question

    I am trying to extract the node values from a XML file:
    <root>
      <frame>
         <boxes>
           <box>
              <spec>22</spec>
              <spec>2222</spec>
           </box>
           <box>
              <spec id="BA" value="short"/>
              <spec id="BB" value="thin"/>
              <spec id="BC" value="black"/>
              <spec id="BD" value="full"/>
              <spec id="BE" value="7"/>
              <spec id="BF" value="deactive"/>
           </box>                
         </boxes>
         <circles>
           <circle id="CA" value="blue"/>
           <circle id="CB" value="green"/>
         </circles>
      </frame>
    </root>I use this code:
             XPathFactory factory = XPathFactory.newInstance();
             XPath xpath = factory.newXPath();
             XPathExpression xPathExpression = xpath.compile("/root/frame/boxes/box/spec");            
             Object result = xPathExpression.evaluate(doc, XPathConstants.NODESET);
             NodeList nodes = (NodeList) result;
             for (int i = 0; i < nodes.getLength(); i++) {
                 System.out.println(nodes.item(i).getNodeValue());
             }But only:
    null
    null
    null
    null
    null
    null
    null
    null
    get printed. I would have assumed:
    22
    2222
    null
    null
    null
    null
    null
    null
    since the two first spec nodes contains the above numbers. Any ideas?

    change this:
    XPathExpression xPathExpression = xpath.compile("/root/frame/boxes/box/spec");to this:
    XPathExpression xPathExpression = xpath.compile("/root/frame/boxes/box/spec/text()");Need to xpath all the way down to the text of the node.
    You could use
    System.out.println(nodes.item(i).getTextContent());with your current xpath but if the spec node has children, these will also be included in the output.

  • A simple Spry Accordion Question (I think)

    Hi all:
    I've searched but can't find, but I think this is a simple one.
    I've created a basic Spry accordion menu with DW/CS3 - Insert/Spry/Spry Accordion. How do I get the first "Content 1" to be hidden/not visible upon page load. Right now, the "Lable 2" must be clicked to hide the "Content 1" which of course shows the "Content 2"? Guessing it's in the JS, but I'm not sure. TIA for any help. HTML and JS Code below.
    <!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>
    <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 1</div>
        <div class="AccordionPanelContent">Content 1</div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 2</div>
        <div class="AccordionPanelContent">Content 2</div>
      </div>
    </div>
    <script type="text/javascript">
    <!--
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    //-->
    </script>
    </body>
    </html>
    JAVASCRIPT
    var Spry;
    if (!Spry) Spry = {};
    if (!Spry.Widget) Spry.Widget = {};
    Spry.Widget.Accordion = function(element, opts)
        this.element = this.getElement(element);
        this.defaultPanel = 0;
        this.hoverClass = "AccordionPanelTabHover";
        this.openClass = "AccordionPanelOpen";
        this.closedClass = "AccordionPanelClosed";
        this.focusedClass = "AccordionFocused";
        this.enableAnimation = true;
        this.enableKeyboardNavigation = true;
        this.currentPanel = null;
        this.animator = null;
        this.hasFocus = null;
        this.duration = 500;
        this.previousPanelKeyCode = Spry.Widget.Accordion.KEY_UP;
        this.nextPanelKeyCode = Spry.Widget.Accordion.KEY_DOWN;
        this.useFixedPanelHeights = true;
        this.fixedPanelHeight = 0;
        Spry.Widget.Accordion.setOptions(this, opts, true);
        // Unfortunately in some browsers like Safari, the Stylesheets our
        // page depends on may not have been loaded at the time we are called.
        // This means we have to defer attaching our behaviors until after the
        // onload event fires, since some of our behaviors rely on dimensions
        // specified in the CSS.
        if (Spry.Widget.Accordion.onloadDidFire)
            this.attachBehaviors();
        else
            Spry.Widget.Accordion.loadQueue.push(this);
    Spry.Widget.Accordion.onloadDidFire = false;
    Spry.Widget.Accordion.loadQueue = [];
    Spry.Widget.Accordion.addLoadListener = function(handler)
        if (typeof window.addEventListener != 'undefined')
            window.addEventListener('load', handler, false);
        else if (typeof document.addEventListener != 'undefined')
            document.addEventListener('load', handler, false);
        else if (typeof window.attachEvent != 'undefined')
            window.attachEvent('onload', handler);
    Spry.Widget.Accordion.processLoadQueue = function(handler)
        Spry.Widget.Accordion.onloadDidFire = true;
        var q = Spry.Widget.Accordion.loadQueue;
        var qlen = q.length;
        for (var i = 0; i < qlen; i++)
            q[i].attachBehaviors();
    Spry.Widget.Accordion.addLoadListener(Spry.Widget.Accordion.processLoadQueue);
    Spry.Widget.Accordion.prototype.getElement = function(ele)
        if (ele && typeof ele == "string")
            return document.getElementById(ele);
        return ele;
    Spry.Widget.Accordion.prototype.addClassName = function(ele, className)
        if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1))
            return;
        ele.className += (ele.className ? " " : "") + className;
    Spry.Widget.Accordion.prototype.removeClassName = function(ele, className)
        if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1))
            return;
        ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), "");
    Spry.Widget.Accordion.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
        if (!optionsObj)
            return;
        for (var optionName in optionsObj)
            if (ignoreUndefinedProps && optionsObj[optionName] == undefined)
                continue;
            obj[optionName] = optionsObj[optionName];
    Spry.Widget.Accordion.prototype.onPanelTabMouseOver = function(panel)
        if (panel)
            this.addClassName(this.getPanelTab(panel), this.hoverClass);
    Spry.Widget.Accordion.prototype.onPanelTabMouseOut = function(panel)
        if (panel)
            this.removeClassName(this.getPanelTab(panel), this.hoverClass);
    Spry.Widget.Accordion.prototype.openPanel = function(panel)
        var panelA = this.currentPanel;
        var panelB = panel;
        if (!panelB || panelA == panelB)   
            return;
        var contentA;
        if( panelA )
            contentA = this.getPanelContent(panelA);
        var contentB = this.getPanelContent(panelB);
        if (! contentB)
            return;
        if (this.useFixedPanelHeights && !this.fixedPanelHeight)
            this.fixedPanelHeight = (contentA.offsetHeight) ? contentA.offsetHeight : contentA.scrollHeight;
        if (this.enableAnimation)
            if (this.animator)
                this.animator.stop();
            this.animator = new Spry.Widget.Accordion.PanelAnimator(this, panelB, { duration: this.duration });
            this.animator.start();
        else
            if(contentA)
                contentA.style.height = "0px";
            contentB.style.height = (this.useFixedPanelHeights ? this.fixedPanelHeight : contentB.scrollHeight) + "px";
        if(panelA)
            this.removeClassName(panelA, this.openClass);
            this.addClassName(panelA, this.closedClass);
        this.removeClassName(panelB, this.closedClass);
        this.addClassName(panelB, this.openClass);
        this.currentPanel = panelB;
    Spry.Widget.Accordion.prototype.openNextPanel = function()
        var panels = this.getPanels();
        var curPanelIndex = this.getCurrentPanelIndex();
        if( panels && curPanelIndex >= 0 && (curPanelIndex+1) < panels.length )
            this.openPanel(panels[curPanelIndex+1]);
    Spry.Widget.Accordion.prototype.openPreviousPanel = function()
        var panels = this.getPanels();
        var curPanelIndex = this.getCurrentPanelIndex();
        if( panels && curPanelIndex > 0 && curPanelIndex < panels.length )
            this.openPanel(panels[curPanelIndex-1]);
    Spry.Widget.Accordion.prototype.openFirstPanel = function()
        var panels = this.getPanels();
        if( panels )
            this.openPanel(panels[0]);
    Spry.Widget.Accordion.prototype.openLastPanel = function()
        var panels = this.getPanels();
        if( panels )
            this.openPanel(panels[panels.length-1]);
    Spry.Widget.Accordion.prototype.onPanelClick = function(panel)
        // if (this.enableKeyboardNavigation)
        //     this.element.focus();
        if (panel != this.currentPanel)
            this.openPanel(panel);
        this.focus();
    Spry.Widget.Accordion.prototype.onFocus = function(e)
        // this.element.focus();
        this.hasFocus = true;
        this.addClassName(this.element, this.focusedClass);
    Spry.Widget.Accordion.prototype.onBlur = function(e)
        // this.element.blur();
        this.hasFocus = false;
        this.removeClassName(this.element, this.focusedClass);
    Spry.Widget.Accordion.KEY_UP = 38;
    Spry.Widget.Accordion.KEY_DOWN = 40;
    Spry.Widget.Accordion.prototype.onKeyDown = function(e)
        var key = e.keyCode;
        if (!this.hasFocus || (key != this.previousPanelKeyCode && key != this.nextPanelKeyCode))
            return true;
        var panels = this.getPanels();
        if (!panels || panels.length < 1)
            return false;
        var currentPanel = this.currentPanel ? this.currentPanel : panels[0];
        var nextPanel = (key == this.nextPanelKeyCode) ? currentPanel.nextSibling : currentPanel.previousSibling;
        while (nextPanel)
            if (nextPanel.nodeType == 1 /* Node.ELEMENT_NODE */)
                break;
            nextPanel = (key == this.nextPanelKeyCode) ? nextPanel.nextSibling : nextPanel.previousSibling;
        if (nextPanel && currentPanel != nextPanel)
            this.openPanel(nextPanel);
        if (e.stopPropagation)
            e.stopPropagation();
        if (e.preventDefault)
            e.preventDefault();
        return false;
    Spry.Widget.Accordion.prototype.attachPanelHandlers = function(panel)
        if (!panel)
            return;
        var tab = this.getPanelTab(panel);
        if (tab)
            var self = this;
            Spry.Widget.Accordion.addEventListener(tab, "click", function(e) { return self.onPanelClick(panel); }, false);
            Spry.Widget.Accordion.addEventListener(tab, "mouseover", function(e) { return self.onPanelTabMouseOver(panel); }, false);
            Spry.Widget.Accordion.addEventListener(tab, "mouseout", function(e) { return self.onPanelTabMouseOut(panel); }, false);
    Spry.Widget.Accordion.addEventListener = function(element, eventType, handler, capture)
        try
            if (element.addEventListener)
                element.addEventListener(eventType, handler, capture);
            else if (element.attachEvent)
                element.attachEvent("on" + eventType, handler);
        catch (e) {}
    Spry.Widget.Accordion.prototype.initPanel = function(panel, isDefault)
        var content = this.getPanelContent(panel);
        if (isDefault)
            this.currentPanel = panel;
            this.removeClassName(panel, this.closedClass);
            this.addClassName(panel, this.openClass);
        else
            this.removeClassName(panel, this.openClass);
            this.addClassName(panel, this.closedClass);
            content.style.height = "0px";
        this.attachPanelHandlers(panel);
    Spry.Widget.Accordion.prototype.attachBehaviors = function()
        var panels = this.getPanels();
        for (var i = 0; i < panels.length; i++)
            this.initPanel(panels[i], i == this.defaultPanel);
        if (this.enableKeyboardNavigation)
            // XXX: IE doesn't allow the setting of tabindex dynamically. This means we can't
            // rely on adding the tabindex attribute if it is missing to enable keyboard navigation
            // by default.
            var tabIndexAttr = this.element.attributes.getNamedItem("tabindex");
            // if (!tabIndexAttr) this.element.tabindex = 0;
            if (tabIndexAttr)
                var self = this;
                Spry.Widget.Accordion.addEventListener(this.element, "focus", function(e) { return self.onFocus(e); }, false);
                Spry.Widget.Accordion.addEventListener(this.element, "blur", function(e) { return self.onBlur(e); }, false);
                Spry.Widget.Accordion.addEventListener(this.element, "keydown", function(e) { return self.onKeyDown(e); }, false);
    Spry.Widget.Accordion.prototype.getPanels = function()
        return this.getElementChildren(this.element);
    Spry.Widget.Accordion.prototype.getCurrentPanel = function()
        return this.currentPanel;
    Spry.Widget.Accordion.prototype.getCurrentPanelIndex = function()
        var panels = this.getPanels();
        for( var i = 0 ; i < panels.length; i++ )
            if( this.currentPanel == panels[i] )
                return i;
        return 0;
    Spry.Widget.Accordion.prototype.getPanelTab = function(panel)
        if (!panel)
            return null;
        return this.getElementChildren(panel)[0];
    Spry.Widget.Accordion.prototype.getPanelContent = function(panel)
        if (!panel)
            return null;
        return this.getElementChildren(panel)[1];
    Spry.Widget.Accordion.prototype.getElementChildren = function(element)
        var children = [];
        var child = element.firstChild;
        while (child)
            if (child.nodeType == 1 /* Node.ELEMENT_NODE */)
                children.push(child);
            child = child.nextSibling;
        return children;
    Spry.Widget.Accordion.prototype.focus = function()
        if (this.element && this.element.focus)
            this.element.focus();
    Spry.Widget.Accordion.PanelAnimator = function(accordion, panel, opts)
        this.timer = null;
        this.interval = 0;
        this.stepCount = 0;
        this.fps = 0;
        this.steps = 10;
        this.duration = 500;
        this.onComplete = null;
        this.panel = panel;
        this.panelToOpen = accordion.getElement(panel);
        this.panelData = [];
        Spry.Widget.Accordion.setOptions(this, opts, true);
        // If caller specified speed in terms of frames per second,
        // convert them into steps.
        if (this.fps > 0)
            this.interval = Math.floor(1000 / this.fps);
            this.steps = parseInt((this.duration + (this.interval - 1)) / this.interval);
        else if (this.steps > 0)
            this.interval = this.duration / this.steps;
        // Set up the array of panels we want to animate.
        var panels = accordion.getPanels();
        for (var i = 0; i < panels.length; i++)
            var p = panels[i];
            var c = accordion.getPanelContent(p);
            if (c)
                var h = c.offsetHeight;
                if (h == undefined)
                    h = 0;
                if (p == panel || h > 0)
                    var obj = new Object;
                    obj.panel = p;
                    obj.content = c;
                    obj.fromHeight = h;
                    obj.toHeight = (p == panel) ? (accordion.useFixedPanelHeights ? accordion.fixedPanelHeight : c.scrollHeight) : 0;
                    obj.increment = (obj.toHeight - obj.fromHeight) / this.steps;
                    obj.overflow = c.style.overflow;
                    this.panelData.push(obj);
                    c.style.overflow = "hidden";
                    c.style.height = h + "px";
    Spry.Widget.Accordion.PanelAnimator.prototype.start = function()
        var self = this;
        this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval);
    Spry.Widget.Accordion.PanelAnimator.prototype.stop = function()
        if (this.timer)
            clearTimeout(this.timer);
            // If we're killing the timer, restore the overflow
            // properties on the panels we were animating!
            if (this.stepCount < this.steps)
                for (i = 0; i < this.panelData.length; i++)
                    obj = this.panelData[i];
                    obj.content.style.overflow = obj.overflow;
        this.timer = null;
    Spry.Widget.Accordion.PanelAnimator.prototype.stepAnimation = function()
        ++this.stepCount;
        this.animate();
        if (this.stepCount < this.steps)
            this.start();
        else if (this.onComplete)
            this.onComplete();
    Spry.Widget.Accordion.PanelAnimator.prototype.animate = function()
        var i, obj;
        if (this.stepCount >= this.steps)
            for (i = 0; i < this.panelData.length; i++)
                obj = this.panelData[i];
                if (obj.panel != this.panel)
                    obj.content.style.height = "0px";
                obj.content.style.overflow = obj.overflow;
                obj.content.style.height = obj.toHeight + "px";
        else
            for (i = 0; i < this.panelData.length; i++)
                obj = this.panelData[i];
                obj.fromHeight += obj.increment;
                obj.content.style.height = obj.fromHeight + "px";

    On the bottom of yourpage you have this:
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    Change it to this:
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, defaultPanel: -1 });
    Ken Ford

  • XSLT Xpath question

    Hello all,
    I am kind of a newbie to the xpath sort of translation.
    I am curious on how to:
    Grab the last element with data from the input side of my xsl ?
    I appreciate any help on this.
    Jaden

    I guess I should explain what I am trying to accomplish :)
    I am trying to map an inbound 856 thru the xsl transformation.
    in the pack loop is the delivery detail id. under that are several item loops.
    My issue is that the Item Loop has the serial number where the Pack loop has the delivery detail. I need to copy the deliver detail id for each of the items for the output side of my transformation.
    I use the code /ns1:Transaction-856/ns1:Loop-HL/ns1:Segment-LIN/ns1:Element-234_1[last()]
    But i get only the first number in my output?
    Ty in advance
    Jaden

Maybe you are looking for

  • Self Check and Your self check printing process steps and program in SAP

    Hi  SAP-FICO's My client required  in SAP-ECC-6.0 1.Self Check printing for cash withdrawel  2. your self check for one Vendor or group of vendors  for getting DD from the Bank 3.How to issue  the  same check for more than one vendor   and get debite

  • Missing item in package

    I ordered the "Belkin - Home and Vehicle Chargers for Select Apple® iPad®, iPhone®, and iPod® Models" on 5/16. I received the package today (5/20), but only found the home charger in there, and the vehicle charger was missing. I noticed that on the s

  • ADE changes file names

    The book I downloaded has each chapter as a seperate .pdf, each with it's own unique filename. ADE has retitled every chapter (.pdf) to the name of the book. Now that all the chapters have the same name, I can't transfer them to my Kobo. How do I cha

  • Change Special Procurement in the material master?

    Hi, How can I change Special Procurement in the material master? Right now Special procurement field is greyed out and would not allow me to change it? Sincerely, Ketan

  • Which MBP should I purchase?

    I am a PC user and wanting to switch over to the Mac world. I was looking at the different versions of the MBP and after looking through these threads I'm a little confused. I am hearing that the new MBP's are crashing when doing simple tasks like wa