working tree xbl (xsl based) component

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

working tree xbl (xsl based) component

Jeremiah Jahn-4
Thought I'd submit this to the list incase some one might want it. 
You can use it for a dynamic table of contents or something. Just a handy collapsable tree that can be used on any xml w/o knowing it's structure.

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

    

    @attribute: ref     ::= single node binding 
    @attribute: depth   ::= maximum depth of tree 

    

    Give this component a single node binding and it will create xhtml:li for all of it's attributes,
    and sub lists for all of it's children recusively.

    

    /webapp/WEB-INF/resources/xbl/delcyon/tree-view/tree-view.xbl
-->
<xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:xforms="http://www.w3.org/2002/xforms"    
    xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
    xmlns:xbl="http://www.w3.org/ns/xbl"
    xmlns:dlcn="http://www.delcyon.com/xbl">

    

    <xbl:script>
        // expand or collapse the list by setting the correct style on the parent list item.
        function toggle( e )
        {
            // apply style to hide or show list elements
            if( e.className == 'expand' )
            {
                e.className = 'hide';
            }
            else
            {
                e.className = 'expand';
            }
        }

        

        // prevent a click on a child list element from reaching the parent
        function cancel( evt )
        {
            // stop event from bubbling
            if( window.event )
            {
                window.event.cancelBubble = true;  // ie
            }
            else if (evt.stopPropagation)
            {
                evt.stopPropagation();  // firefox
            }
        }
    </xbl:script>

    

    <xbl:binding  element="dlcn|tree-view">

        

        <xbl:resources>         
            <xbl:style>
                div.box 
                {
                    border-color: black; 
                    border-width: 1px; 
                    border-style: solid;
                    padding: 5px;
                }

                

                /* START COLLAPSE/EXPAND STYLES */
                .hide li { display:none; } /* target list items in "collapse" mode. */
                .hide { list-style-type: square; } /* change bullet to "collapse" */

                

                .expand li { display:normal; }  /* target list items in "expanded" mode. */
                .expand { list-style-type: circle; } /* change bullet to "expanded" */

                

                ul { list-style-type: disc; } /* set the default bullet style */
                /* END COLLAPSE/EXPAND STYLES */

                

                span.nodename
                {
                    font-size: larger; 
                    font-weight: bold;
                }

                

                span.leafname
                {
                    font-size: larger;                     
                }

                

                span.leafvalue
                {
                    font-weight: bold;
                }

                

                

            </xbl:style>
        </xbl:resources>

        

 

        

        <xbl:template xxbl:transform="oxf:xslt">

            

            <xsl:transform version="2.0">

                

                <xsl:template match="@*|node()">
                    <xsl:copy>
                        <xsl:apply-templates select="@*|node()" />
                    </xsl:copy>
                </xsl:template>

                

                <xsl:template match="dlcn:tree-view">
                    <xhtml:div>
                        <xforms:group xbl:attr="ref" xxbl:scope="outer">
                            <!-- Start copying the variables over that we need -->

                           

                            <xxforms:variable name="data" xxbl:scope="inner" >
                                <xxforms:sequence select="." xxbl:scope="outer"/>
                            </xxforms:variable>

                           

                            <!-- end external variable copying -->

                            

                            <!-- START MAIN GROUP-->
                            <xforms:group xxbl:scope="inner">
                                <xforms:group ref="$data">
                                    <xsl:choose>
                                        <xsl:when test="exists(@depth)">
                                            <xsl:call-template name="node">
                                                <xsl:with-param name="depth" select="@depth"/>    
                                            </xsl:call-template>
                                        </xsl:when>
                                        <xsl:otherwise>
                                            <xsl:call-template name="node">
                                                <xsl:with-param name="depth">5</xsl:with-param>    
                                            </xsl:call-template>
                                        </xsl:otherwise>
                                    </xsl:choose>
                                </xforms:group>    
                            </xforms:group>
                            <!-- END MAIN GROUP -->

                            

                        </xforms:group>
                    </xhtml:div>
                </xsl:template>

                

                <xsl:template name="node">
                    <xsl:param name="depth"/>
                    <span class="nodename"><xforms:output value="local-name()"/></span>
                    <br/>
                    <xhtml:ul onclick="cancel( event )">
                        <!-- This will display all of the attributes in this element -->
                        <xforms:repeat nodeset="@*">
                            <xhtml:li>
                                <span class="leafname"><xforms:output value="local-name()"/>: </span><span class="leafvalue"><xforms:output value="."/></span>
                            </xhtml:li>
                        </xforms:repeat>
                        <!-- Repeat over each child node of the root node -->
                        <xsl:if test="$depth > 1">
                            <xforms:repeat nodeset="*">
                                <xhtml:li class="hide" onclick="toggle( this )">                                        
                                    <!-- if this element has children recurse into it -->                                       
                                    <xsl:call-template name="node">
                                        <xsl:with-param name="depth" select="$depth - 1"/>
                                    </xsl:call-template>
                                </xhtml:li>
                            </xforms:repeat>
                        </xsl:if>
                    </xhtml:ul>
                </xsl:template>
            </xsl:transform>

            

        </xbl:template>

        

    </xbl:binding>
</xbl:xbl>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: working tree xbl (xsl based) component

Alessandro  Vernet
Administrator
Hi Jeremiah,

Thank you for sharing! What would you think about creating a page
under "Contributions" adding some information about this XBL
component? Let me know if you're interested, and I'll add you to the
wiki ACL, so you can do that.

Alex

On Sun, Mar 28, 2010 at 10:30 AM, Jeremiah Jahn <[hidden email]> wrote:

> Thought I'd submit this to the list incase some one might want it.
> You can use it for a dynamic table of contents or something. Just a handy
> collapsable tree that can be used on any xml w/o knowing it's structure.
> <?xml version="1.0" encoding="UTF-8"?>
> <!--
>
>
>
>     @attribute: ref     ::= single node binding
>     @attribute: depth   ::= maximum depth of tree
>
>
>
>     Give this component a single node binding and it will create xhtml:li
> for all of it's attributes,
>     and sub lists for all of it's children recusively.
>
>
>
>     /webapp/WEB-INF/resources/xbl/delcyon/tree-view/tree-view.xbl
> -->
> <xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml"
>     xmlns:xforms="http://www.w3.org/2002/xforms"
>     xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>     xmlns:xbl="http://www.w3.org/ns/xbl"
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>     xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
>     xmlns:dlcn="http://www.delcyon.com/xbl">
>
>
>
>     <xbl:script>
>         // expand or collapse the list by setting the correct style on the
> parent list item.
>         function toggle( e )
>         {
>             // apply style to hide or show list elements
>             if( e.className == 'expand' )
>             {
>                 e.className = 'hide';
>             }
>             else
>             {
>                 e.className = 'expand';
>             }
>         }
>
>
>
>         // prevent a click on a child list element from reaching the parent
>         function cancel( evt )
>         {
>             // stop event from bubbling
>             if( window.event )
>             {
>                 window.event.cancelBubble = true;  // ie
>             }
>             else if (evt.stopPropagation)
>             {
>                 evt.stopPropagation();  // firefox
>             }
>         }
>     </xbl:script>
>
>
>
>     <xbl:binding  element="dlcn|tree-view">
>
>
>
>         <xbl:resources>
>             <xbl:style>
>                 div.box
>                 {
>                     border-color: black;
>                     border-width: 1px;
>                     border-style: solid;
>                     padding: 5px;
>                 }
>
>
>
>                 /* START COLLAPSE/EXPAND STYLES */
>                 .hide li { display:none; } /* target list items in
> "collapse" mode. */
>                 .hide { list-style-type: square; } /* change bullet to
> "collapse" */
>
>
>
>                 .expand li { display:normal; }  /* target list items in
> "expanded" mode. */
>                 .expand { list-style-type: circle; } /* change bullet to
> "expanded" */
>
>
>
>                 ul { list-style-type: disc; } /* set the default bullet
> style */
>                 /* END COLLAPSE/EXPAND STYLES */
>
>
>
>                 span.nodename
>                 {
>                     font-size: larger;
>                     font-weight: bold;
>                 }
>
>
>
>                 span.leafname
>                 {
>                     font-size: larger;
>                 }
>
>
>
>                 span.leafvalue
>                 {
>                     font-weight: bold;
>                 }
>
>
>
>
>
>             </xbl:style>
>         </xbl:resources>
>
>
>
>
>
>
>
>         <xbl:template xxbl:transform="oxf:xslt">
>
>
>
>             <xsl:transform version="2.0">
>
>
>
>                 <xsl:template match="@*|node()">
>                     <xsl:copy>
>                         <xsl:apply-templates select="@*|node()" />
>                     </xsl:copy>
>                 </xsl:template>
>
>
>
>                 <xsl:template match="dlcn:tree-view">
>                     <xhtml:div>
>                         <xforms:group xbl:attr="ref" xxbl:scope="outer">
>                             <!-- Start copying the variables over that we
> need -->
>
>
>
>                             <xxforms:variable name="data" xxbl:scope="inner"
>>
>                                 <xxforms:sequence select="."
> xxbl:scope="outer"/>
>                             </xxforms:variable>
>
>
>
>                             <!-- end external variable copying -->
>
>
>
>                             <!-- START MAIN GROUP-->
>                             <xforms:group xxbl:scope="inner">
>                                 <xforms:group ref="$data">
>                                     <xsl:choose>
>                                         <xsl:when test="exists(@depth)">
>                                             <xsl:call-template name="node">
>                                                 <xsl:with-param name="depth"
> select="@depth"/>
>                                             </xsl:call-template>
>                                         </xsl:when>
>                                         <xsl:otherwise>
>                                             <xsl:call-template name="node">
>                                                 <xsl:with-param
> name="depth">5</xsl:with-param>
>                                             </xsl:call-template>
>                                         </xsl:otherwise>
>                                     </xsl:choose>
>                                 </xforms:group>
>                             </xforms:group>
>                             <!-- END MAIN GROUP -->
>
>
>
>                         </xforms:group>
>                     </xhtml:div>
>                 </xsl:template>
>
>
>
>                 <xsl:template name="node">
>                     <xsl:param name="depth"/>
>                     <span class="nodename"><xforms:output
> value="local-name()"/></span>
>                     <br/>
>                     <xhtml:ul onclick="cancel( event )">
>                         <!-- This will display all of the attributes in this
> element -->
>                         <xforms:repeat nodeset="@*">
>                             <xhtml:li>
>                                 <span class="leafname"><xforms:output
> value="local-name()"/>: </span><span class="leafvalue"><xforms:output
> value="."/></span>
>                             </xhtml:li>
>                         </xforms:repeat>
>                         <!-- Repeat over each child node of the root node
> -->
>                         <xsl:if test="$depth > 1">
>                             <xforms:repeat nodeset="*">
>                                 <xhtml:li class="hide" onclick="toggle( this
> )">
>                                     <!-- if this element has children
> recurse into it -->
>                                     <xsl:call-template name="node">
>                                         <xsl:with-param name="depth"
> select="$depth - 1"/>
>                                     </xsl:call-template>
>                                 </xhtml:li>
>                             </xforms:repeat>
>                         </xsl:if>
>                     </xhtml:ul>
>                 </xsl:template>
>             </xsl:transform>
>
>
>
>         </xbl:template>
>
>
>
>     </xbl:binding>
> </xbl:xbl>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: working tree xbl (xsl based) component

Jeremiah Jahn-4
Sure. It's not the prettiest thing in the world, but it does make a good example of a number of things. You will need to let me know what namespace it should go under to make it easier for people to use.


On Mar 30, 2010, at 6:06 PM, Alessandro Vernet wrote:

> Hi Jeremiah,
>
> Thank you for sharing! What would you think about creating a page
> under "Contributions" adding some information about this XBL
> component? Let me know if you're interested, and I'll add you to the
> wiki ACL, so you can do that.
>
> Alex
>
> On Sun, Mar 28, 2010 at 10:30 AM, Jeremiah Jahn <[hidden email]> wrote:
>> Thought I'd submit this to the list incase some one might want it.
>> You can use it for a dynamic table of contents or something. Just a handy
>> collapsable tree that can be used on any xml w/o knowing it's structure.
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!--
>>
>>
>>
>>     @attribute: ref     ::= single node binding
>>     @attribute: depth   ::= maximum depth of tree
>>
>>
>>
>>     Give this component a single node binding and it will create xhtml:li
>> for all of it's attributes,
>>     and sub lists for all of it's children recusively.
>>
>>
>>
>>     /webapp/WEB-INF/resources/xbl/delcyon/tree-view/tree-view.xbl
>> -->
>> <xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml"
>>     xmlns:xforms="http://www.w3.org/2002/xforms"
>>     xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>>     xmlns:xbl="http://www.w3.org/ns/xbl"
>>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>     xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
>>     xmlns:dlcn="http://www.delcyon.com/xbl">
>>
>>
>>
>>     <xbl:script>
>>         // expand or collapse the list by setting the correct style on the
>> parent list item.
>>         function toggle( e )
>>         {
>>             // apply style to hide or show list elements
>>             if( e.className == 'expand' )
>>             {
>>                 e.className = 'hide';
>>             }
>>             else
>>             {
>>                 e.className = 'expand';
>>             }
>>         }
>>
>>
>>
>>         // prevent a click on a child list element from reaching the parent
>>         function cancel( evt )
>>         {
>>             // stop event from bubbling
>>             if( window.event )
>>             {
>>                 window.event.cancelBubble = true;  // ie
>>             }
>>             else if (evt.stopPropagation)
>>             {
>>                 evt.stopPropagation();  // firefox
>>             }
>>         }
>>     </xbl:script>
>>
>>
>>
>>     <xbl:binding  element="dlcn|tree-view">
>>
>>
>>
>>         <xbl:resources>
>>             <xbl:style>
>>                 div.box
>>                 {
>>                     border-color: black;
>>                     border-width: 1px;
>>                     border-style: solid;
>>                     padding: 5px;
>>                 }
>>
>>
>>
>>                 /* START COLLAPSE/EXPAND STYLES */
>>                 .hide li { display:none; } /* target list items in
>> "collapse" mode. */
>>                 .hide { list-style-type: square; } /* change bullet to
>> "collapse" */
>>
>>
>>
>>                 .expand li { display:normal; }  /* target list items in
>> "expanded" mode. */
>>                 .expand { list-style-type: circle; } /* change bullet to
>> "expanded" */
>>
>>
>>
>>                 ul { list-style-type: disc; } /* set the default bullet
>> style */
>>                 /* END COLLAPSE/EXPAND STYLES */
>>
>>
>>
>>                 span.nodename
>>                 {
>>                     font-size: larger;
>>                     font-weight: bold;
>>                 }
>>
>>
>>
>>                 span.leafname
>>                 {
>>                     font-size: larger;
>>                 }
>>
>>
>>
>>                 span.leafvalue
>>                 {
>>                     font-weight: bold;
>>                 }
>>
>>
>>
>>
>>
>>             </xbl:style>
>>         </xbl:resources>
>>
>>
>>
>>
>>
>>
>>
>>         <xbl:template xxbl:transform="oxf:xslt">
>>
>>
>>
>>             <xsl:transform version="2.0">
>>
>>
>>
>>                 <xsl:template match="@*|node()">
>>                     <xsl:copy>
>>                         <xsl:apply-templates select="@*|node()" />
>>                     </xsl:copy>
>>                 </xsl:template>
>>
>>
>>
>>                 <xsl:template match="dlcn:tree-view">
>>                     <xhtml:div>
>>                         <xforms:group xbl:attr="ref" xxbl:scope="outer">
>>                             <!-- Start copying the variables over that we
>> need -->
>>
>>
>>
>>                             <xxforms:variable name="data" xxbl:scope="inner"
>>>
>>                                 <xxforms:sequence select="."
>> xxbl:scope="outer"/>
>>                             </xxforms:variable>
>>
>>
>>
>>                             <!-- end external variable copying -->
>>
>>
>>
>>                             <!-- START MAIN GROUP-->
>>                             <xforms:group xxbl:scope="inner">
>>                                 <xforms:group ref="$data">
>>                                     <xsl:choose>
>>                                         <xsl:when test="exists(@depth)">
>>                                             <xsl:call-template name="node">
>>                                                 <xsl:with-param name="depth"
>> select="@depth"/>
>>                                             </xsl:call-template>
>>                                         </xsl:when>
>>                                         <xsl:otherwise>
>>                                             <xsl:call-template name="node">
>>                                                 <xsl:with-param
>> name="depth">5</xsl:with-param>
>>                                             </xsl:call-template>
>>                                         </xsl:otherwise>
>>                                     </xsl:choose>
>>                                 </xforms:group>
>>                             </xforms:group>
>>                             <!-- END MAIN GROUP -->
>>
>>
>>
>>                         </xforms:group>
>>                     </xhtml:div>
>>                 </xsl:template>
>>
>>
>>
>>                 <xsl:template name="node">
>>                     <xsl:param name="depth"/>
>>                     <span class="nodename"><xforms:output
>> value="local-name()"/></span>
>>                     <br/>
>>                     <xhtml:ul onclick="cancel( event )">
>>                         <!-- This will display all of the attributes in this
>> element -->
>>                         <xforms:repeat nodeset="@*">
>>                             <xhtml:li>
>>                                 <span class="leafname"><xforms:output
>> value="local-name()"/>: </span><span class="leafvalue"><xforms:output
>> value="."/></span>
>>                             </xhtml:li>
>>                         </xforms:repeat>
>>                         <!-- Repeat over each child node of the root node
>> -->
>>                         <xsl:if test="$depth > 1">
>>                             <xforms:repeat nodeset="*">
>>                                 <xhtml:li class="hide" onclick="toggle( this
>> )">
>>                                     <!-- if this element has children
>> recurse into it -->
>>                                     <xsl:call-template name="node">
>>                                         <xsl:with-param name="depth"
>> select="$depth - 1"/>
>>                                     </xsl:call-template>
>>                                 </xhtml:li>
>>                             </xforms:repeat>
>>                         </xsl:if>
>>                     </xhtml:ul>
>>                 </xsl:template>
>>             </xsl:transform>
>>
>>
>>
>>         </xbl:template>
>>
>>
>>
>>     </xbl:binding>
>> </xbl:xbl>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing
>> list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/
> My Twitter: http://twitter.com/avernet
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: working tree xbl (xsl based) component

Alessandro  Vernet
Administrator
Jeremiah,

You can put it under your own namespace; e.g. if your company is
Totally Awesome Components Inc., you could have
xmlns:ac="http://www.totallyawesomecomponents.com/xbl".

Also, so we can add you to the wiki, we'll need from you an email that
you can use to log into Google (such as a Gmail address). If you wish,
feel free to send me this information in a private email.

Alex

On Tue, Mar 30, 2010 at 7:36 PM, Jeremiah Jahn <[hidden email]> wrote:

> Sure. It's not the prettiest thing in the world, but it does make a good example of a number of things. You will need to let me know what namespace it should go under to make it easier for people to use.
>
>
> On Mar 30, 2010, at 6:06 PM, Alessandro Vernet wrote:
>
>> Hi Jeremiah,
>>
>> Thank you for sharing! What would you think about creating a page
>> under "Contributions" adding some information about this XBL
>> component? Let me know if you're interested, and I'll add you to the
>> wiki ACL, so you can do that.
>>
>> Alex
>>
>> On Sun, Mar 28, 2010 at 10:30 AM, Jeremiah Jahn <[hidden email]> wrote:
>>> Thought I'd submit this to the list incase some one might want it.
>>> You can use it for a dynamic table of contents or something. Just a handy
>>> collapsable tree that can be used on any xml w/o knowing it's structure.
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!--
>>>
>>>
>>>
>>>     @attribute: ref     ::= single node binding
>>>     @attribute: depth   ::= maximum depth of tree
>>>
>>>
>>>
>>>     Give this component a single node binding and it will create xhtml:li
>>> for all of it's attributes,
>>>     and sub lists for all of it's children recusively.
>>>
>>>
>>>
>>>     /webapp/WEB-INF/resources/xbl/delcyon/tree-view/tree-view.xbl
>>> -->
>>> <xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml"
>>>     xmlns:xforms="http://www.w3.org/2002/xforms"
>>>     xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>>>     xmlns:xbl="http://www.w3.org/ns/xbl"
>>>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>     xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
>>>     xmlns:dlcn="http://www.delcyon.com/xbl">
>>>
>>>
>>>
>>>     <xbl:script>
>>>         // expand or collapse the list by setting the correct style on the
>>> parent list item.
>>>         function toggle( e )
>>>         {
>>>             // apply style to hide or show list elements
>>>             if( e.className == 'expand' )
>>>             {
>>>                 e.className = 'hide';
>>>             }
>>>             else
>>>             {
>>>                 e.className = 'expand';
>>>             }
>>>         }
>>>
>>>
>>>
>>>         // prevent a click on a child list element from reaching the parent
>>>         function cancel( evt )
>>>         {
>>>             // stop event from bubbling
>>>             if( window.event )
>>>             {
>>>                 window.event.cancelBubble = true;  // ie
>>>             }
>>>             else if (evt.stopPropagation)
>>>             {
>>>                 evt.stopPropagation();  // firefox
>>>             }
>>>         }
>>>     </xbl:script>
>>>
>>>
>>>
>>>     <xbl:binding  element="dlcn|tree-view">
>>>
>>>
>>>
>>>         <xbl:resources>
>>>             <xbl:style>
>>>                 div.box
>>>                 {
>>>                     border-color: black;
>>>                     border-width: 1px;
>>>                     border-style: solid;
>>>                     padding: 5px;
>>>                 }
>>>
>>>
>>>
>>>                 /* START COLLAPSE/EXPAND STYLES */
>>>                 .hide li { display:none; } /* target list items in
>>> "collapse" mode. */
>>>                 .hide { list-style-type: square; } /* change bullet to
>>> "collapse" */
>>>
>>>
>>>
>>>                 .expand li { display:normal; }  /* target list items in
>>> "expanded" mode. */
>>>                 .expand { list-style-type: circle; } /* change bullet to
>>> "expanded" */
>>>
>>>
>>>
>>>                 ul { list-style-type: disc; } /* set the default bullet
>>> style */
>>>                 /* END COLLAPSE/EXPAND STYLES */
>>>
>>>
>>>
>>>                 span.nodename
>>>                 {
>>>                     font-size: larger;
>>>                     font-weight: bold;
>>>                 }
>>>
>>>
>>>
>>>                 span.leafname
>>>                 {
>>>                     font-size: larger;
>>>                 }
>>>
>>>
>>>
>>>                 span.leafvalue
>>>                 {
>>>                     font-weight: bold;
>>>                 }
>>>
>>>
>>>
>>>
>>>
>>>             </xbl:style>
>>>         </xbl:resources>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>         <xbl:template xxbl:transform="oxf:xslt">
>>>
>>>
>>>
>>>             <xsl:transform version="2.0">
>>>
>>>
>>>
>>>                 <xsl:template match="@*|node()">
>>>                     <xsl:copy>
>>>                         <xsl:apply-templates select="@*|node()" />
>>>                     </xsl:copy>
>>>                 </xsl:template>
>>>
>>>
>>>
>>>                 <xsl:template match="dlcn:tree-view">
>>>                     <xhtml:div>
>>>                         <xforms:group xbl:attr="ref" xxbl:scope="outer">
>>>                             <!-- Start copying the variables over that we
>>> need -->
>>>
>>>
>>>
>>>                             <xxforms:variable name="data" xxbl:scope="inner"
>>>>
>>>                                 <xxforms:sequence select="."
>>> xxbl:scope="outer"/>
>>>                             </xxforms:variable>
>>>
>>>
>>>
>>>                             <!-- end external variable copying -->
>>>
>>>
>>>
>>>                             <!-- START MAIN GROUP-->
>>>                             <xforms:group xxbl:scope="inner">
>>>                                 <xforms:group ref="$data">
>>>                                     <xsl:choose>
>>>                                         <xsl:when test="exists(@depth)">
>>>                                             <xsl:call-template name="node">
>>>                                                 <xsl:with-param name="depth"
>>> select="@depth"/>
>>>                                             </xsl:call-template>
>>>                                         </xsl:when>
>>>                                         <xsl:otherwise>
>>>                                             <xsl:call-template name="node">
>>>                                                 <xsl:with-param
>>> name="depth">5</xsl:with-param>
>>>                                             </xsl:call-template>
>>>                                         </xsl:otherwise>
>>>                                     </xsl:choose>
>>>                                 </xforms:group>
>>>                             </xforms:group>
>>>                             <!-- END MAIN GROUP -->
>>>
>>>
>>>
>>>                         </xforms:group>
>>>                     </xhtml:div>
>>>                 </xsl:template>
>>>
>>>
>>>
>>>                 <xsl:template name="node">
>>>                     <xsl:param name="depth"/>
>>>                     <span class="nodename"><xforms:output
>>> value="local-name()"/></span>
>>>                     <br/>
>>>                     <xhtml:ul onclick="cancel( event )">
>>>                         <!-- This will display all of the attributes in this
>>> element -->
>>>                         <xforms:repeat nodeset="@*">
>>>                             <xhtml:li>
>>>                                 <span class="leafname"><xforms:output
>>> value="local-name()"/>: </span><span class="leafvalue"><xforms:output
>>> value="."/></span>
>>>                             </xhtml:li>
>>>                         </xforms:repeat>
>>>                         <!-- Repeat over each child node of the root node
>>> -->
>>>                         <xsl:if test="$depth > 1">
>>>                             <xforms:repeat nodeset="*">
>>>                                 <xhtml:li class="hide" onclick="toggle( this
>>> )">
>>>                                     <!-- if this element has children
>>> recurse into it -->
>>>                                     <xsl:call-template name="node">
>>>                                         <xsl:with-param name="depth"
>>> select="$depth - 1"/>
>>>                                     </xsl:call-template>
>>>                                 </xhtml:li>
>>>                             </xforms:repeat>
>>>                         </xsl:if>
>>>                     </xhtml:ul>
>>>                 </xsl:template>
>>>             </xsl:transform>
>>>
>>>
>>>
>>>         </xbl:template>
>>>
>>>
>>>
>>>     </xbl:binding>
>>> </xbl:xbl>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing
>>> list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>>
>> --
>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>> http://www.orbeon.com/
>> My Twitter: http://twitter.com/avernet
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: working tree xbl (xsl based) component

Jeremiah Jahn-4
It's in the wiki now, not sure if it's in the right place, but I figured if it wasn't it could always be moved.

On Mar 31, 2010, at 1:34 PM, Alessandro Vernet wrote:

> Jeremiah,
>
> You can put it under your own namespace; e.g. if your company is
> Totally Awesome Components Inc., you could have
> xmlns:ac="http://www.totallyawesomecomponents.com/xbl".
>
> Also, so we can add you to the wiki, we'll need from you an email that
> you can use to log into Google (such as a Gmail address). If you wish,
> feel free to send me this information in a private email.
>
> Alex
>
> On Tue, Mar 30, 2010 at 7:36 PM, Jeremiah Jahn <[hidden email]> wrote:
>> Sure. It's not the prettiest thing in the world, but it does make a good example of a number of things. You will need to let me know what namespace it should go under to make it easier for people to use.
>>
>>
>> On Mar 30, 2010, at 6:06 PM, Alessandro Vernet wrote:
>>
>>> Hi Jeremiah,
>>>
>>> Thank you for sharing! What would you think about creating a page
>>> under "Contributions" adding some information about this XBL
>>> component? Let me know if you're interested, and I'll add you to the
>>> wiki ACL, so you can do that.
>>>
>>> Alex
>>>
>>> On Sun, Mar 28, 2010 at 10:30 AM, Jeremiah Jahn <[hidden email]> wrote:
>>>> Thought I'd submit this to the list incase some one might want it.
>>>> You can use it for a dynamic table of contents or something. Just a handy
>>>> collapsable tree that can be used on any xml w/o knowing it's structure.
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <!--
>>>>
>>>>
>>>>
>>>>     @attribute: ref     ::= single node binding
>>>>     @attribute: depth   ::= maximum depth of tree
>>>>
>>>>
>>>>
>>>>     Give this component a single node binding and it will create xhtml:li
>>>> for all of it's attributes,
>>>>     and sub lists for all of it's children recusively.
>>>>
>>>>
>>>>
>>>>     /webapp/WEB-INF/resources/xbl/delcyon/tree-view/tree-view.xbl
>>>> -->
>>>> <xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml"
>>>>     xmlns:xforms="http://www.w3.org/2002/xforms"
>>>>     xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>>>>     xmlns:xbl="http://www.w3.org/ns/xbl"
>>>>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>>     xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
>>>>     xmlns:dlcn="http://www.delcyon.com/xbl">
>>>>
>>>>
>>>>
>>>>     <xbl:script>
>>>>         // expand or collapse the list by setting the correct style on the
>>>> parent list item.
>>>>         function toggle( e )
>>>>         {
>>>>             // apply style to hide or show list elements
>>>>             if( e.className == 'expand' )
>>>>             {
>>>>                 e.className = 'hide';
>>>>             }
>>>>             else
>>>>             {
>>>>                 e.className = 'expand';
>>>>             }
>>>>         }
>>>>
>>>>
>>>>
>>>>         // prevent a click on a child list element from reaching the parent
>>>>         function cancel( evt )
>>>>         {
>>>>             // stop event from bubbling
>>>>             if( window.event )
>>>>             {
>>>>                 window.event.cancelBubble = true;  // ie
>>>>             }
>>>>             else if (evt.stopPropagation)
>>>>             {
>>>>                 evt.stopPropagation();  // firefox
>>>>             }
>>>>         }
>>>>     </xbl:script>
>>>>
>>>>
>>>>
>>>>     <xbl:binding  element="dlcn|tree-view">
>>>>
>>>>
>>>>
>>>>         <xbl:resources>
>>>>             <xbl:style>
>>>>                 div.box
>>>>                 {
>>>>                     border-color: black;
>>>>                     border-width: 1px;
>>>>                     border-style: solid;
>>>>                     padding: 5px;
>>>>                 }
>>>>
>>>>
>>>>
>>>>                 /* START COLLAPSE/EXPAND STYLES */
>>>>                 .hide li { display:none; } /* target list items in
>>>> "collapse" mode. */
>>>>                 .hide { list-style-type: square; } /* change bullet to
>>>> "collapse" */
>>>>
>>>>
>>>>
>>>>                 .expand li { display:normal; }  /* target list items in
>>>> "expanded" mode. */
>>>>                 .expand { list-style-type: circle; } /* change bullet to
>>>> "expanded" */
>>>>
>>>>
>>>>
>>>>                 ul { list-style-type: disc; } /* set the default bullet
>>>> style */
>>>>                 /* END COLLAPSE/EXPAND STYLES */
>>>>
>>>>
>>>>
>>>>                 span.nodename
>>>>                 {
>>>>                     font-size: larger;
>>>>                     font-weight: bold;
>>>>                 }
>>>>
>>>>
>>>>
>>>>                 span.leafname
>>>>                 {
>>>>                     font-size: larger;
>>>>                 }
>>>>
>>>>
>>>>
>>>>                 span.leafvalue
>>>>                 {
>>>>                     font-weight: bold;
>>>>                 }
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>             </xbl:style>
>>>>         </xbl:resources>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>         <xbl:template xxbl:transform="oxf:xslt">
>>>>
>>>>
>>>>
>>>>             <xsl:transform version="2.0">
>>>>
>>>>
>>>>
>>>>                 <xsl:template match="@*|node()">
>>>>                     <xsl:copy>
>>>>                         <xsl:apply-templates select="@*|node()" />
>>>>                     </xsl:copy>
>>>>                 </xsl:template>
>>>>
>>>>
>>>>
>>>>                 <xsl:template match="dlcn:tree-view">
>>>>                     <xhtml:div>
>>>>                         <xforms:group xbl:attr="ref" xxbl:scope="outer">
>>>>                             <!-- Start copying the variables over that we
>>>> need -->
>>>>
>>>>
>>>>
>>>>                             <xxforms:variable name="data" xxbl:scope="inner"
>>>>>
>>>>                                 <xxforms:sequence select="."
>>>> xxbl:scope="outer"/>
>>>>                             </xxforms:variable>
>>>>
>>>>
>>>>
>>>>                             <!-- end external variable copying -->
>>>>
>>>>
>>>>
>>>>                             <!-- START MAIN GROUP-->
>>>>                             <xforms:group xxbl:scope="inner">
>>>>                                 <xforms:group ref="$data">
>>>>                                     <xsl:choose>
>>>>                                         <xsl:when test="exists(@depth)">
>>>>                                             <xsl:call-template name="node">
>>>>                                                 <xsl:with-param name="depth"
>>>> select="@depth"/>
>>>>                                             </xsl:call-template>
>>>>                                         </xsl:when>
>>>>                                         <xsl:otherwise>
>>>>                                             <xsl:call-template name="node">
>>>>                                                 <xsl:with-param
>>>> name="depth">5</xsl:with-param>
>>>>                                             </xsl:call-template>
>>>>                                         </xsl:otherwise>
>>>>                                     </xsl:choose>
>>>>                                 </xforms:group>
>>>>                             </xforms:group>
>>>>                             <!-- END MAIN GROUP -->
>>>>
>>>>
>>>>
>>>>                         </xforms:group>
>>>>                     </xhtml:div>
>>>>                 </xsl:template>
>>>>
>>>>
>>>>
>>>>                 <xsl:template name="node">
>>>>                     <xsl:param name="depth"/>
>>>>                     <span class="nodename"><xforms:output
>>>> value="local-name()"/></span>
>>>>                     <br/>
>>>>                     <xhtml:ul onclick="cancel( event )">
>>>>                         <!-- This will display all of the attributes in this
>>>> element -->
>>>>                         <xforms:repeat nodeset="@*">
>>>>                             <xhtml:li>
>>>>                                 <span class="leafname"><xforms:output
>>>> value="local-name()"/>: </span><span class="leafvalue"><xforms:output
>>>> value="."/></span>
>>>>                             </xhtml:li>
>>>>                         </xforms:repeat>
>>>>                         <!-- Repeat over each child node of the root node
>>>> -->
>>>>                         <xsl:if test="$depth > 1">
>>>>                             <xforms:repeat nodeset="*">
>>>>                                 <xhtml:li class="hide" onclick="toggle( this
>>>> )">
>>>>                                     <!-- if this element has children
>>>> recurse into it -->
>>>>                                     <xsl:call-template name="node">
>>>>                                         <xsl:with-param name="depth"
>>>> select="$depth - 1"/>
>>>>                                     </xsl:call-template>
>>>>                                 </xhtml:li>
>>>>                             </xforms:repeat>
>>>>                         </xsl:if>
>>>>                     </xhtml:ul>
>>>>                 </xsl:template>
>>>>             </xsl:transform>
>>>>
>>>>
>>>>
>>>>         </xbl:template>
>>>>
>>>>
>>>>
>>>>     </xbl:binding>
>>>> </xbl:xbl>
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [hidden email] mailing
>>>> list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>>> http://www.orbeon.com/
>>> My Twitter: http://twitter.com/avernet
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/
> My Twitter: http://twitter.com/avernet
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: working tree xbl (xsl based) component

Alessandro  Vernet
Administrator
Jeremiah,

It's in the right place. Thank you for the contribution. I think it
would be good to have a paragraph of text explaining what this
component does, maybe with a screenshot, and an example. Just in case
you can find the time to put this together :).

Alex

On Tue, Apr 6, 2010 at 4:31 AM, Jeremiah Jahn <[hidden email]> wrote:

> It's in the wiki now, not sure if it's in the right place, but I figured if it wasn't it could always be moved.
>
> On Mar 31, 2010, at 1:34 PM, Alessandro Vernet wrote:
>
>> Jeremiah,
>>
>> You can put it under your own namespace; e.g. if your company is
>> Totally Awesome Components Inc., you could have
>> xmlns:ac="http://www.totallyawesomecomponents.com/xbl".
>>
>> Also, so we can add you to the wiki, we'll need from you an email that
>> you can use to log into Google (such as a Gmail address). If you wish,
>> feel free to send me this information in a private email.
>>
>> Alex
>>
>> On Tue, Mar 30, 2010 at 7:36 PM, Jeremiah Jahn <[hidden email]> wrote:
>>> Sure. It's not the prettiest thing in the world, but it does make a good example of a number of things. You will need to let me know what namespace it should go under to make it easier for people to use.
>>>
>>>
>>> On Mar 30, 2010, at 6:06 PM, Alessandro Vernet wrote:
>>>
>>>> Hi Jeremiah,
>>>>
>>>> Thank you for sharing! What would you think about creating a page
>>>> under "Contributions" adding some information about this XBL
>>>> component? Let me know if you're interested, and I'll add you to the
>>>> wiki ACL, so you can do that.
>>>>
>>>> Alex
>>>>
>>>> On Sun, Mar 28, 2010 at 10:30 AM, Jeremiah Jahn <[hidden email]> wrote:
>>>>> Thought I'd submit this to the list incase some one might want it.
>>>>> You can use it for a dynamic table of contents or something. Just a handy
>>>>> collapsable tree that can be used on any xml w/o knowing it's structure.
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <!--
>>>>>
>>>>>
>>>>>
>>>>>     @attribute: ref     ::= single node binding
>>>>>     @attribute: depth   ::= maximum depth of tree
>>>>>
>>>>>
>>>>>
>>>>>     Give this component a single node binding and it will create xhtml:li
>>>>> for all of it's attributes,
>>>>>     and sub lists for all of it's children recusively.
>>>>>
>>>>>
>>>>>
>>>>>     /webapp/WEB-INF/resources/xbl/delcyon/tree-view/tree-view.xbl
>>>>> -->
>>>>> <xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml"
>>>>>     xmlns:xforms="http://www.w3.org/2002/xforms"
>>>>>     xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>>>>>     xmlns:xbl="http://www.w3.org/ns/xbl"
>>>>>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>>>     xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
>>>>>     xmlns:dlcn="http://www.delcyon.com/xbl">
>>>>>
>>>>>
>>>>>
>>>>>     <xbl:script>
>>>>>         // expand or collapse the list by setting the correct style on the
>>>>> parent list item.
>>>>>         function toggle( e )
>>>>>         {
>>>>>             // apply style to hide or show list elements
>>>>>             if( e.className == 'expand' )
>>>>>             {
>>>>>                 e.className = 'hide';
>>>>>             }
>>>>>             else
>>>>>             {
>>>>>                 e.className = 'expand';
>>>>>             }
>>>>>         }
>>>>>
>>>>>
>>>>>
>>>>>         // prevent a click on a child list element from reaching the parent
>>>>>         function cancel( evt )
>>>>>         {
>>>>>             // stop event from bubbling
>>>>>             if( window.event )
>>>>>             {
>>>>>                 window.event.cancelBubble = true;  // ie
>>>>>             }
>>>>>             else if (evt.stopPropagation)
>>>>>             {
>>>>>                 evt.stopPropagation();  // firefox
>>>>>             }
>>>>>         }
>>>>>     </xbl:script>
>>>>>
>>>>>
>>>>>
>>>>>     <xbl:binding  element="dlcn|tree-view">
>>>>>
>>>>>
>>>>>
>>>>>         <xbl:resources>
>>>>>             <xbl:style>
>>>>>                 div.box
>>>>>                 {
>>>>>                     border-color: black;
>>>>>                     border-width: 1px;
>>>>>                     border-style: solid;
>>>>>                     padding: 5px;
>>>>>                 }
>>>>>
>>>>>
>>>>>
>>>>>                 /* START COLLAPSE/EXPAND STYLES */
>>>>>                 .hide li { display:none; } /* target list items in
>>>>> "collapse" mode. */
>>>>>                 .hide { list-style-type: square; } /* change bullet to
>>>>> "collapse" */
>>>>>
>>>>>
>>>>>
>>>>>                 .expand li { display:normal; }  /* target list items in
>>>>> "expanded" mode. */
>>>>>                 .expand { list-style-type: circle; } /* change bullet to
>>>>> "expanded" */
>>>>>
>>>>>
>>>>>
>>>>>                 ul { list-style-type: disc; } /* set the default bullet
>>>>> style */
>>>>>                 /* END COLLAPSE/EXPAND STYLES */
>>>>>
>>>>>
>>>>>
>>>>>                 span.nodename
>>>>>                 {
>>>>>                     font-size: larger;
>>>>>                     font-weight: bold;
>>>>>                 }
>>>>>
>>>>>
>>>>>
>>>>>                 span.leafname
>>>>>                 {
>>>>>                     font-size: larger;
>>>>>                 }
>>>>>
>>>>>
>>>>>
>>>>>                 span.leafvalue
>>>>>                 {
>>>>>                     font-weight: bold;
>>>>>                 }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>             </xbl:style>
>>>>>         </xbl:resources>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>         <xbl:template xxbl:transform="oxf:xslt">
>>>>>
>>>>>
>>>>>
>>>>>             <xsl:transform version="2.0">
>>>>>
>>>>>
>>>>>
>>>>>                 <xsl:template match="@*|node()">
>>>>>                     <xsl:copy>
>>>>>                         <xsl:apply-templates select="@*|node()" />
>>>>>                     </xsl:copy>
>>>>>                 </xsl:template>
>>>>>
>>>>>
>>>>>
>>>>>                 <xsl:template match="dlcn:tree-view">
>>>>>                     <xhtml:div>
>>>>>                         <xforms:group xbl:attr="ref" xxbl:scope="outer">
>>>>>                             <!-- Start copying the variables over that we
>>>>> need -->
>>>>>
>>>>>
>>>>>
>>>>>                             <xxforms:variable name="data" xxbl:scope="inner"
>>>>>>
>>>>>                                 <xxforms:sequence select="."
>>>>> xxbl:scope="outer"/>
>>>>>                             </xxforms:variable>
>>>>>
>>>>>
>>>>>
>>>>>                             <!-- end external variable copying -->
>>>>>
>>>>>
>>>>>
>>>>>                             <!-- START MAIN GROUP-->
>>>>>                             <xforms:group xxbl:scope="inner">
>>>>>                                 <xforms:group ref="$data">
>>>>>                                     <xsl:choose>
>>>>>                                         <xsl:when test="exists(@depth)">
>>>>>                                             <xsl:call-template name="node">
>>>>>                                                 <xsl:with-param name="depth"
>>>>> select="@depth"/>
>>>>>                                             </xsl:call-template>
>>>>>                                         </xsl:when>
>>>>>                                         <xsl:otherwise>
>>>>>                                             <xsl:call-template name="node">
>>>>>                                                 <xsl:with-param
>>>>> name="depth">5</xsl:with-param>
>>>>>                                             </xsl:call-template>
>>>>>                                         </xsl:otherwise>
>>>>>                                     </xsl:choose>
>>>>>                                 </xforms:group>
>>>>>                             </xforms:group>
>>>>>                             <!-- END MAIN GROUP -->
>>>>>
>>>>>
>>>>>
>>>>>                         </xforms:group>
>>>>>                     </xhtml:div>
>>>>>                 </xsl:template>
>>>>>
>>>>>
>>>>>
>>>>>                 <xsl:template name="node">
>>>>>                     <xsl:param name="depth"/>
>>>>>                     <span class="nodename"><xforms:output
>>>>> value="local-name()"/></span>
>>>>>                     <br/>
>>>>>                     <xhtml:ul onclick="cancel( event )">
>>>>>                         <!-- This will display all of the attributes in this
>>>>> element -->
>>>>>                         <xforms:repeat nodeset="@*">
>>>>>                             <xhtml:li>
>>>>>                                 <span class="leafname"><xforms:output
>>>>> value="local-name()"/>: </span><span class="leafvalue"><xforms:output
>>>>> value="."/></span>
>>>>>                             </xhtml:li>
>>>>>                         </xforms:repeat>
>>>>>                         <!-- Repeat over each child node of the root node
>>>>> -->
>>>>>                         <xsl:if test="$depth > 1">
>>>>>                             <xforms:repeat nodeset="*">
>>>>>                                 <xhtml:li class="hide" onclick="toggle( this
>>>>> )">
>>>>>                                     <!-- if this element has children
>>>>> recurse into it -->
>>>>>                                     <xsl:call-template name="node">
>>>>>                                         <xsl:with-param name="depth"
>>>>> select="$depth - 1"/>
>>>>>                                     </xsl:call-template>
>>>>>                                 </xhtml:li>
>>>>>                             </xforms:repeat>
>>>>>                         </xsl:if>
>>>>>                     </xhtml:ul>
>>>>>                 </xsl:template>
>>>>>             </xsl:transform>
>>>>>
>>>>>
>>>>>
>>>>>         </xbl:template>
>>>>>
>>>>>
>>>>>
>>>>>     </xbl:binding>
>>>>> </xbl:xbl>
>>>>>
>>>>>
>>>>> --
>>>>> You receive this message as a subscriber of the [hidden email] mailing
>>>>> list.
>>>>> To unsubscribe: mailto:[hidden email]
>>>>> For general help: mailto:[hidden email]?subject=help
>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>>>> http://www.orbeon.com/
>>>> My Twitter: http://twitter.com/avernet
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>>
>> --
>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>> http://www.orbeon.com/
>> My Twitter: http://twitter.com/avernet
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: working tree xbl (xsl based) component

Jeremiah Jahn-4
I think it's all there now, so let me know if there is anything else you'd like.  I'll hopefully have the test case to you by the weekend.

On Apr 6, 2010, at 1:47 PM, Alessandro Vernet wrote:

> Jeremiah,
>
> It's in the right place. Thank you for the contribution. I think it
> would be good to have a paragraph of text explaining what this
> component does, maybe with a screenshot, and an example. Just in case
> you can find the time to put this together :).
>
> Alex
>
> On Tue, Apr 6, 2010 at 4:31 AM, Jeremiah Jahn <[hidden email]> wrote:
>> It's in the wiki now, not sure if it's in the right place, but I figured if it wasn't it could always be moved.
>>
>> On Mar 31, 2010, at 1:34 PM, Alessandro Vernet wrote:
>>
>>> Jeremiah,
>>>
>>> You can put it under your own namespace; e.g. if your company is
>>> Totally Awesome Components Inc., you could have
>>> xmlns:ac="http://www.totallyawesomecomponents.com/xbl".
>>>
>>> Also, so we can add you to the wiki, we'll need from you an email that
>>> you can use to log into Google (such as a Gmail address). If you wish,
>>> feel free to send me this information in a private email.
>>>
>>> Alex
>>>
>>> On Tue, Mar 30, 2010 at 7:36 PM, Jeremiah Jahn <[hidden email]> wrote:
>>>> Sure. It's not the prettiest thing in the world, but it does make a good example of a number of things. You will need to let me know what namespace it should go under to make it easier for people to use.
>>>>
>>>>
>>>> On Mar 30, 2010, at 6:06 PM, Alessandro Vernet wrote:
>>>>
>>>>> Hi Jeremiah,
>>>>>
>>>>> Thank you for sharing! What would you think about creating a page
>>>>> under "Contributions" adding some information about this XBL
>>>>> component? Let me know if you're interested, and I'll add you to the
>>>>> wiki ACL, so you can do that.
>>>>>
>>>>> Alex
>>>>>
>>>>> On Sun, Mar 28, 2010 at 10:30 AM, Jeremiah Jahn <[hidden email]> wrote:
>>>>>> Thought I'd submit this to the list incase some one might want it.
>>>>>> You can use it for a dynamic table of contents or something. Just a handy
>>>>>> collapsable tree that can be used on any xml w/o knowing it's structure.
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <!--
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @attribute: ref     ::= single node binding
>>>>>>     @attribute: depth   ::= maximum depth of tree
>>>>>>
>>>>>>
>>>>>>
>>>>>>     Give this component a single node binding and it will create xhtml:li
>>>>>> for all of it's attributes,
>>>>>>     and sub lists for all of it's children recusively.
>>>>>>
>>>>>>
>>>>>>
>>>>>>     /webapp/WEB-INF/resources/xbl/delcyon/tree-view/tree-view.xbl
>>>>>> -->
>>>>>> <xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml"
>>>>>>     xmlns:xforms="http://www.w3.org/2002/xforms"
>>>>>>     xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>>>>>>     xmlns:xbl="http://www.w3.org/ns/xbl"
>>>>>>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>>>>     xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
>>>>>>     xmlns:dlcn="http://www.delcyon.com/xbl">
>>>>>>
>>>>>>
>>>>>>
>>>>>>     <xbl:script>
>>>>>>         // expand or collapse the list by setting the correct style on the
>>>>>> parent list item.
>>>>>>         function toggle( e )
>>>>>>         {
>>>>>>             // apply style to hide or show list elements
>>>>>>             if( e.className == 'expand' )
>>>>>>             {
>>>>>>                 e.className = 'hide';
>>>>>>             }
>>>>>>             else
>>>>>>             {
>>>>>>                 e.className = 'expand';
>>>>>>             }
>>>>>>         }
>>>>>>
>>>>>>
>>>>>>
>>>>>>         // prevent a click on a child list element from reaching the parent
>>>>>>         function cancel( evt )
>>>>>>         {
>>>>>>             // stop event from bubbling
>>>>>>             if( window.event )
>>>>>>             {
>>>>>>                 window.event.cancelBubble = true;  // ie
>>>>>>             }
>>>>>>             else if (evt.stopPropagation)
>>>>>>             {
>>>>>>                 evt.stopPropagation();  // firefox
>>>>>>             }
>>>>>>         }
>>>>>>     </xbl:script>
>>>>>>
>>>>>>
>>>>>>
>>>>>>     <xbl:binding  element="dlcn|tree-view">
>>>>>>
>>>>>>
>>>>>>
>>>>>>         <xbl:resources>
>>>>>>             <xbl:style>
>>>>>>                 div.box
>>>>>>                 {
>>>>>>                     border-color: black;
>>>>>>                     border-width: 1px;
>>>>>>                     border-style: solid;
>>>>>>                     padding: 5px;
>>>>>>                 }
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 /* START COLLAPSE/EXPAND STYLES */
>>>>>>                 .hide li { display:none; } /* target list items in
>>>>>> "collapse" mode. */
>>>>>>                 .hide { list-style-type: square; } /* change bullet to
>>>>>> "collapse" */
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 .expand li { display:normal; }  /* target list items in
>>>>>> "expanded" mode. */
>>>>>>                 .expand { list-style-type: circle; } /* change bullet to
>>>>>> "expanded" */
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 ul { list-style-type: disc; } /* set the default bullet
>>>>>> style */
>>>>>>                 /* END COLLAPSE/EXPAND STYLES */
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 span.nodename
>>>>>>                 {
>>>>>>                     font-size: larger;
>>>>>>                     font-weight: bold;
>>>>>>                 }
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 span.leafname
>>>>>>                 {
>>>>>>                     font-size: larger;
>>>>>>                 }
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 span.leafvalue
>>>>>>                 {
>>>>>>                     font-weight: bold;
>>>>>>                 }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>             </xbl:style>
>>>>>>         </xbl:resources>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>         <xbl:template xxbl:transform="oxf:xslt">
>>>>>>
>>>>>>
>>>>>>
>>>>>>             <xsl:transform version="2.0">
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 <xsl:template match="@*|node()">
>>>>>>                     <xsl:copy>
>>>>>>                         <xsl:apply-templates select="@*|node()" />
>>>>>>                     </xsl:copy>
>>>>>>                 </xsl:template>
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 <xsl:template match="dlcn:tree-view">
>>>>>>                     <xhtml:div>
>>>>>>                         <xforms:group xbl:attr="ref" xxbl:scope="outer">
>>>>>>                             <!-- Start copying the variables over that we
>>>>>> need -->
>>>>>>
>>>>>>
>>>>>>
>>>>>>                             <xxforms:variable name="data" xxbl:scope="inner"
>>>>>>>
>>>>>>                                 <xxforms:sequence select="."
>>>>>> xxbl:scope="outer"/>
>>>>>>                             </xxforms:variable>
>>>>>>
>>>>>>
>>>>>>
>>>>>>                             <!-- end external variable copying -->
>>>>>>
>>>>>>
>>>>>>
>>>>>>                             <!-- START MAIN GROUP-->
>>>>>>                             <xforms:group xxbl:scope="inner">
>>>>>>                                 <xforms:group ref="$data">
>>>>>>                                     <xsl:choose>
>>>>>>                                         <xsl:when test="exists(@depth)">
>>>>>>                                             <xsl:call-template name="node">
>>>>>>                                                 <xsl:with-param name="depth"
>>>>>> select="@depth"/>
>>>>>>                                             </xsl:call-template>
>>>>>>                                         </xsl:when>
>>>>>>                                         <xsl:otherwise>
>>>>>>                                             <xsl:call-template name="node">
>>>>>>                                                 <xsl:with-param
>>>>>> name="depth">5</xsl:with-param>
>>>>>>                                             </xsl:call-template>
>>>>>>                                         </xsl:otherwise>
>>>>>>                                     </xsl:choose>
>>>>>>                                 </xforms:group>
>>>>>>                             </xforms:group>
>>>>>>                             <!-- END MAIN GROUP -->
>>>>>>
>>>>>>
>>>>>>
>>>>>>                         </xforms:group>
>>>>>>                     </xhtml:div>
>>>>>>                 </xsl:template>
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 <xsl:template name="node">
>>>>>>                     <xsl:param name="depth"/>
>>>>>>                     <span class="nodename"><xforms:output
>>>>>> value="local-name()"/></span>
>>>>>>                     <br/>
>>>>>>                     <xhtml:ul onclick="cancel( event )">
>>>>>>                         <!-- This will display all of the attributes in this
>>>>>> element -->
>>>>>>                         <xforms:repeat nodeset="@*">
>>>>>>                             <xhtml:li>
>>>>>>                                 <span class="leafname"><xforms:output
>>>>>> value="local-name()"/>: </span><span class="leafvalue"><xforms:output
>>>>>> value="."/></span>
>>>>>>                             </xhtml:li>
>>>>>>                         </xforms:repeat>
>>>>>>                         <!-- Repeat over each child node of the root node
>>>>>> -->
>>>>>>                         <xsl:if test="$depth > 1">
>>>>>>                             <xforms:repeat nodeset="*">
>>>>>>                                 <xhtml:li class="hide" onclick="toggle( this
>>>>>> )">
>>>>>>                                     <!-- if this element has children
>>>>>> recurse into it -->
>>>>>>                                     <xsl:call-template name="node">
>>>>>>                                         <xsl:with-param name="depth"
>>>>>> select="$depth - 1"/>
>>>>>>                                     </xsl:call-template>
>>>>>>                                 </xhtml:li>
>>>>>>                             </xforms:repeat>
>>>>>>                         </xsl:if>
>>>>>>                     </xhtml:ul>
>>>>>>                 </xsl:template>
>>>>>>             </xsl:transform>
>>>>>>
>>>>>>
>>>>>>
>>>>>>         </xbl:template>
>>>>>>
>>>>>>
>>>>>>
>>>>>>     </xbl:binding>
>>>>>> </xbl:xbl>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You receive this message as a subscriber of the [hidden email] mailing
>>>>>> list.
>>>>>> To unsubscribe: mailto:[hidden email]
>>>>>> For general help: mailto:[hidden email]?subject=help
>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>>>>> http://www.orbeon.com/
>>>>> My Twitter: http://twitter.com/avernet
>>>>>
>>>>> --
>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>> To unsubscribe: mailto:[hidden email]
>>>>> For general help: mailto:[hidden email]?subject=help
>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>>> http://www.orbeon.com/
>>> My Twitter: http://twitter.com/avernet
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/
> My Twitter: http://twitter.com/avernet
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: working tree xbl (xsl based) component

Alessandro  Vernet
Administrator
Jeremiah,

Great; thank you for the added introduction, example, and screenshot.
This will be of great help to those interested in this component.

Alex

On Wed, Apr 7, 2010 at 7:19 PM, Jeremiah Jahn <[hidden email]> wrote:

> I think it's all there now, so let me know if there is anything else you'd like.  I'll hopefully have the test case to you by the weekend.
>
> On Apr 6, 2010, at 1:47 PM, Alessandro Vernet wrote:
>
>> Jeremiah,
>>
>> It's in the right place. Thank you for the contribution. I think it
>> would be good to have a paragraph of text explaining what this
>> component does, maybe with a screenshot, and an example. Just in case
>> you can find the time to put this together :).
>>
>> Alex
>>
>> On Tue, Apr 6, 2010 at 4:31 AM, Jeremiah Jahn <[hidden email]> wrote:
>>> It's in the wiki now, not sure if it's in the right place, but I figured if it wasn't it could always be moved.
>>>
>>> On Mar 31, 2010, at 1:34 PM, Alessandro Vernet wrote:
>>>
>>>> Jeremiah,
>>>>
>>>> You can put it under your own namespace; e.g. if your company is
>>>> Totally Awesome Components Inc., you could have
>>>> xmlns:ac="http://www.totallyawesomecomponents.com/xbl".
>>>>
>>>> Also, so we can add you to the wiki, we'll need from you an email that
>>>> you can use to log into Google (such as a Gmail address). If you wish,
>>>> feel free to send me this information in a private email.
>>>>
>>>> Alex
>>>>
>>>> On Tue, Mar 30, 2010 at 7:36 PM, Jeremiah Jahn <[hidden email]> wrote:
>>>>> Sure. It's not the prettiest thing in the world, but it does make a good example of a number of things. You will need to let me know what namespace it should go under to make it easier for people to use.
>>>>>
>>>>>
>>>>> On Mar 30, 2010, at 6:06 PM, Alessandro Vernet wrote:
>>>>>
>>>>>> Hi Jeremiah,
>>>>>>
>>>>>> Thank you for sharing! What would you think about creating a page
>>>>>> under "Contributions" adding some information about this XBL
>>>>>> component? Let me know if you're interested, and I'll add you to the
>>>>>> wiki ACL, so you can do that.
>>>>>>
>>>>>> Alex
>>>>>>
>>>>>> On Sun, Mar 28, 2010 at 10:30 AM, Jeremiah Jahn <[hidden email]> wrote:
>>>>>>> Thought I'd submit this to the list incase some one might want it.
>>>>>>> You can use it for a dynamic table of contents or something. Just a handy
>>>>>>> collapsable tree that can be used on any xml w/o knowing it's structure.
>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>> <!--
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>     @attribute: ref     ::= single node binding
>>>>>>>     @attribute: depth   ::= maximum depth of tree
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>     Give this component a single node binding and it will create xhtml:li
>>>>>>> for all of it's attributes,
>>>>>>>     and sub lists for all of it's children recusively.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>     /webapp/WEB-INF/resources/xbl/delcyon/tree-view/tree-view.xbl
>>>>>>> -->
>>>>>>> <xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml"
>>>>>>>     xmlns:xforms="http://www.w3.org/2002/xforms"
>>>>>>>     xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>>>>>>>     xmlns:xbl="http://www.w3.org/ns/xbl"
>>>>>>>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>>>>>     xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
>>>>>>>     xmlns:dlcn="http://www.delcyon.com/xbl">
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>     <xbl:script>
>>>>>>>         // expand or collapse the list by setting the correct style on the
>>>>>>> parent list item.
>>>>>>>         function toggle( e )
>>>>>>>         {
>>>>>>>             // apply style to hide or show list elements
>>>>>>>             if( e.className == 'expand' )
>>>>>>>             {
>>>>>>>                 e.className = 'hide';
>>>>>>>             }
>>>>>>>             else
>>>>>>>             {
>>>>>>>                 e.className = 'expand';
>>>>>>>             }
>>>>>>>         }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>         // prevent a click on a child list element from reaching the parent
>>>>>>>         function cancel( evt )
>>>>>>>         {
>>>>>>>             // stop event from bubbling
>>>>>>>             if( window.event )
>>>>>>>             {
>>>>>>>                 window.event.cancelBubble = true;  // ie
>>>>>>>             }
>>>>>>>             else if (evt.stopPropagation)
>>>>>>>             {
>>>>>>>                 evt.stopPropagation();  // firefox
>>>>>>>             }
>>>>>>>         }
>>>>>>>     </xbl:script>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>     <xbl:binding  element="dlcn|tree-view">
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>         <xbl:resources>
>>>>>>>             <xbl:style>
>>>>>>>                 div.box
>>>>>>>                 {
>>>>>>>                     border-color: black;
>>>>>>>                     border-width: 1px;
>>>>>>>                     border-style: solid;
>>>>>>>                     padding: 5px;
>>>>>>>                 }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                 /* START COLLAPSE/EXPAND STYLES */
>>>>>>>                 .hide li { display:none; } /* target list items in
>>>>>>> "collapse" mode. */
>>>>>>>                 .hide { list-style-type: square; } /* change bullet to
>>>>>>> "collapse" */
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                 .expand li { display:normal; }  /* target list items in
>>>>>>> "expanded" mode. */
>>>>>>>                 .expand { list-style-type: circle; } /* change bullet to
>>>>>>> "expanded" */
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                 ul { list-style-type: disc; } /* set the default bullet
>>>>>>> style */
>>>>>>>                 /* END COLLAPSE/EXPAND STYLES */
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                 span.nodename
>>>>>>>                 {
>>>>>>>                     font-size: larger;
>>>>>>>                     font-weight: bold;
>>>>>>>                 }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                 span.leafname
>>>>>>>                 {
>>>>>>>                     font-size: larger;
>>>>>>>                 }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                 span.leafvalue
>>>>>>>                 {
>>>>>>>                     font-weight: bold;
>>>>>>>                 }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>             </xbl:style>
>>>>>>>         </xbl:resources>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>         <xbl:template xxbl:transform="oxf:xslt">
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>             <xsl:transform version="2.0">
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                 <xsl:template match="@*|node()">
>>>>>>>                     <xsl:copy>
>>>>>>>                         <xsl:apply-templates select="@*|node()" />
>>>>>>>                     </xsl:copy>
>>>>>>>                 </xsl:template>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                 <xsl:template match="dlcn:tree-view">
>>>>>>>                     <xhtml:div>
>>>>>>>                         <xforms:group xbl:attr="ref" xxbl:scope="outer">
>>>>>>>                             <!-- Start copying the variables over that we
>>>>>>> need -->
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                             <xxforms:variable name="data" xxbl:scope="inner"
>>>>>>>>
>>>>>>>                                 <xxforms:sequence select="."
>>>>>>> xxbl:scope="outer"/>
>>>>>>>                             </xxforms:variable>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                             <!-- end external variable copying -->
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                             <!-- START MAIN GROUP-->
>>>>>>>                             <xforms:group xxbl:scope="inner">
>>>>>>>                                 <xforms:group ref="$data">
>>>>>>>                                     <xsl:choose>
>>>>>>>                                         <xsl:when test="exists(@depth)">
>>>>>>>                                             <xsl:call-template name="node">
>>>>>>>                                                 <xsl:with-param name="depth"
>>>>>>> select="@depth"/>
>>>>>>>                                             </xsl:call-template>
>>>>>>>                                         </xsl:when>
>>>>>>>                                         <xsl:otherwise>
>>>>>>>                                             <xsl:call-template name="node">
>>>>>>>                                                 <xsl:with-param
>>>>>>> name="depth">5</xsl:with-param>
>>>>>>>                                             </xsl:call-template>
>>>>>>>                                         </xsl:otherwise>
>>>>>>>                                     </xsl:choose>
>>>>>>>                                 </xforms:group>
>>>>>>>                             </xforms:group>
>>>>>>>                             <!-- END MAIN GROUP -->
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                         </xforms:group>
>>>>>>>                     </xhtml:div>
>>>>>>>                 </xsl:template>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                 <xsl:template name="node">
>>>>>>>                     <xsl:param name="depth"/>
>>>>>>>                     <span class="nodename"><xforms:output
>>>>>>> value="local-name()"/></span>
>>>>>>>                     <br/>
>>>>>>>                     <xhtml:ul onclick="cancel( event )">
>>>>>>>                         <!-- This will display all of the attributes in this
>>>>>>> element -->
>>>>>>>                         <xforms:repeat nodeset="@*">
>>>>>>>                             <xhtml:li>
>>>>>>>                                 <span class="leafname"><xforms:output
>>>>>>> value="local-name()"/>: </span><span class="leafvalue"><xforms:output
>>>>>>> value="."/></span>
>>>>>>>                             </xhtml:li>
>>>>>>>                         </xforms:repeat>
>>>>>>>                         <!-- Repeat over each child node of the root node
>>>>>>> -->
>>>>>>>                         <xsl:if test="$depth > 1">
>>>>>>>                             <xforms:repeat nodeset="*">
>>>>>>>                                 <xhtml:li class="hide" onclick="toggle( this
>>>>>>> )">
>>>>>>>                                     <!-- if this element has children
>>>>>>> recurse into it -->
>>>>>>>                                     <xsl:call-template name="node">
>>>>>>>                                         <xsl:with-param name="depth"
>>>>>>> select="$depth - 1"/>
>>>>>>>                                     </xsl:call-template>
>>>>>>>                                 </xhtml:li>
>>>>>>>                             </xforms:repeat>
>>>>>>>                         </xsl:if>
>>>>>>>                     </xhtml:ul>
>>>>>>>                 </xsl:template>
>>>>>>>             </xsl:transform>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>         </xbl:template>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>     </xbl:binding>
>>>>>>> </xbl:xbl>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> You receive this message as a subscriber of the [hidden email] mailing
>>>>>>> list.
>>>>>>> To unsubscribe: mailto:[hidden email]
>>>>>>> For general help: mailto:[hidden email]?subject=help
>>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>>>>>> http://www.orbeon.com/
>>>>>> My Twitter: http://twitter.com/avernet
>>>>>>
>>>>>> --
>>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>>> To unsubscribe: mailto:[hidden email]
>>>>>> For general help: mailto:[hidden email]?subject=help
>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>> To unsubscribe: mailto:[hidden email]
>>>>> For general help: mailto:[hidden email]?subject=help
>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>>>> http://www.orbeon.com/
>>>> My Twitter: http://twitter.com/avernet
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>>
>> --
>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>> http://www.orbeon.com/
>> My Twitter: http://twitter.com/avernet
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet