[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Using XQuery to prerender html

Anders Viklund viklund_anders at hotmail.com
Thu Aug 7 20:55:33 PDT 2008


  Using XQuery to prerender html
Hi,

I am totally new to XQuery and I would like to know if it is suitable to use XQuery to transform html files into jQuery Treeview format.


Basically, what I would like to to is transform this:

<li>
  <img src="../images/speaker-grey.gif"/>
  <font color="#7f7f7f">
    <b>Root</b>
  </font>
  <ul>
    <li>
      <span class="folder">Order</span>
      <ul>
        <li>
          <span class="file">id = 1234</span>
        </li>
        <li>
          <span class="file">type = order.cancel</span>
        </li>
        <li>
          <span class="folder">Parameter</span>
          <ul>
            <li>
              <span class="file">id = 5678</span>
            </li>
          </ul>
        </li>
        <li>
          <span class="folder">Item</span>
          <ul>
            <li>
              <span class="file">id = 910</span>
            </li>
            <li>
              <span class="file">type = access</span>
            </li>
          </ul>
        </li>
      </ul>
    </li>
  </ul>
</li>



.. into this:

<ul class="filetree treeview">
  <li class="expandable lastExpandable">
    <div class="hitarea expandable-hitarea lastExpandable-hitarea"/>
    <img src="../images/speaker-grey.gif"/>
    <font color="#7f7f7f">
      <b>Root</b>
    </font>
    <ul style="display: none;">
      <li class="collapsable lastCollapsable">
        <div class="hitarea collapsable-hitarea lastCollapsable-hitarea"/>
        <span class="folder">Order</span>
        <ul>
          <li>
            <span class="file">id = 1234</span>
          </li>
          <li>
            <span class="file">type = order.cancel</span>
          </li>
          <li class="collapsable">
            <div class="hitarea collapsable-hitarea"/>
            <span class="folder">Parameter</span>
            <ul>
              <li class="last">
                <span class="file">id = 5678</span>
              </li>
            </ul>
          </li>
          <li class="collapsable lastCollapsable">
            <div class="hitarea collapsable-hitarea lastCollapsable-hitarea"/>
            <span class="folder">Item</span>
            <ul>
              <li>
                <span class="file">id = 910</span>
              </li>
              <li class="last">
                <span class="file">type = access</span>
              </li>
            </ul>
          </li>
        </ul>
      </li>
    </ul>
  </li>
</ul>


This the structure of this jQuery Treeview:

Root
  Order
    id = 1234
    type = order.cancel
    Parameter
      id = 5678
      Item
        id = 910
        type = access


Any ideas how to do this are highly appreciated!

_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20080807/5de7de7a/attachment.htm


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.