Skip navigation
ss82
Currently Being Moderated

xml and tabbed panels

Jul 20, 2012 7:58 AM

hi all,

 

just wondering if someone would be able to help me out with the below code please?

i get the error message

processTokens() failed to get a data set context!

 

many thanks in advance.

 

cheerio,

S.

 

 

 

HTML

---------------

<!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></title>

<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">

<link href="../css/main.css" rel="stylesheet" type="text/css" />

<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />

<script language="javaScript" type="text/javascript" src="SpryAssets/xpath.js"></script>

<script language="javaScript" type="text/javascript" src="SpryAssets/SpryData.js"></script>

<script type="text/javascript" src="SpryAssets/SpryNestedXMLDataSet.js"></script>

<script language="javaScript" type="text/javascript" src="SpryAssets/widgets/SpryTabbedPanels.js"></script>

<script type="text/javascript">

 

 

var dsLabels = new Spry.Data.XMLDataSet("labels.xml", "labels/label");

var dsLabelTemplates = new Spry.Data.NestedXMLDataSet(dsLabels, "labellink/linkname");

var dsLabelTemplates = new Spry.Data.NestedXMLDataSet(dsLabels, "labellink/link");

 

 

</script>

</head>

 

 

<body style="background:none;">

<div id="contentareawrapper" style="width:500px; height:500px; min-height:500px;">

  <h3>Label Templates</h3>

  <div id="example1Region" spry:region="dsLabels">

    <div id="TP1" class="TabbedPanels">

      <ul class="TabbedPanelsTabGroup">

        <li spry:repeat="dsLabels" class="TabbedPanelsTab" tabindex="0">{labelname}</li>

      </ul>

      <div class="TabbedPanelsContentGroup">

        <div spry:repeat="dsLabelTemplates" class="TabbedPanelsContent">

          <div>

            <ul>

              <li spry:repeat="dsLabelTemplates"><a href="{link}">{linkname}</a></li>

            </ul>

          </div>

        </div>

      </div>

    </div>

    <script type="text/javascript">

var t1 = new Spry.Widget.TabbedPanels("TP1");

</script>

  </div>

</div>

</body>

</html>

 

 

 

-----------XML

-----------------

<?xml version="1.0" encoding="UTF-8"?>

<labels>

  <label>

    <labelname>Circles</labelname>

          <labellink>

                              <linkname>Circle template 1</linkname>

                              <link>templates/circletemplate1</link>

 

                              <linkname>Circle template 2</linkname>

                              <link>templates/circletemplate2</link>

          </labellink>

  </label>

 

 

  <label>

    <labelname>Rectangle</labelname>

          <labellink>

                              <linkname>Rectangle template 1</linkname>

                              <link>templates/circletemplate1</link>

 

                              <linkname>Rectangle template 2</linkname>

                              <link>templates/circletemplate2</link>

          </labellink>

  </label>

 

 

</labels>

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points