item and itemset and namespaces

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

item and itemset and namespaces

Oliver Charlet
here is my sample for the xforms sandbox.

--
-----------------------
oliver charlet
software development

11-041 Olsztyn, Poland

[hidden email]
-----------------------


<?xml version="1.0" encoding="UTF-8"?>
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" >
 <xhtml:head>
  <xhtml:title>Test item and itemset in select1</xhtml:title>
  <xforms:model id="main-model">
   <xforms:instance id="main-no-ns" xmlns="">
           <test>
                   <choice test=""/>
           </test>
   </xforms:instance>
   <xforms:instance id="main-ns" xmlns="www.test-me.org">
           <test>
                   <choice test=""/>
           </test>
   </xforms:instance>
   <xforms:instance id="list-no-ns" xmlns="">
           <root>
    <entities>
     <entity>
                 <id>1</id>
                 <name>first</name>
         </entity>
     <entity>
                 <id>2</id>
                 <name>second</name>
         </entity>
     <entity>
                 <id>3</id>
                 <name>third</name>
         </entity>
    </entities>
                   </root>
   </xforms:instance>
   <xforms:instance id="list-ns" xmlns="www.test-me.org">
           <root>
    <entities>
     <entity>
                 <id>1</id>
                 <name>first</name>
         </entity>
     <entity>
                 <id>2</id>
                 <name>second</name>
         </entity>
     <entity>
                 <id>3</id>
                 <name>third</name>
         </entity>
    </entities>
                   </root>
   </xforms:instance>
  </xforms:model>
 </xhtml:head>
 <xhtml:body>
  <xhtml:h3>Test item and itemset in select1</xhtml:h3>
        <!--xforms:group ref="instance('main-no-ns')"-->
        <xforms:group>
     <xhtml:table>
      <xhtml:tr>
       <xhtml:td>both without namespace:</xhtml:td>
       <xhtml:td>
        <xforms:select1 ref="instance('main-no-ns')/choice/@test">
         <xforms:item>
          <xforms:label>- - no choice - -</xforms:label>
          <xforms:value></xforms:value>
         </xforms:item>
         <xforms:itemset nodeset="instance('list-no-ns')/entities/entity">
          <xforms:label ref="name"/>
          <xforms:value ref="id"/>
         </xforms:itemset>
        </xforms:select1>
       </xhtml:td>
      </xhtml:tr>
     </xhtml:table>
        </xforms:group>

  <xforms:group>
     <xhtml:table>
      <xhtml:tr>
       <xhtml:td>instance without namespace:</xhtml:td>
       <xhtml:td>
        <xforms:select1 ref="instance('main-no-ns')/choice/@test">
         <xforms:item>
          <xforms:label>- - no choice - -</xforms:label>
          <xforms:value></xforms:value>
         </xforms:item>
         <xforms:itemset nodeset="instance('list-ns')/entities/entity">
          <xforms:label ref="name"/>
          <xforms:value ref="id"/>
         </xforms:itemset>
        </xforms:select1>
       </xhtml:td>
      </xhtml:tr>
     </xhtml:table>
        </xforms:group>

  <xforms:group>
     <xhtml:table>
      <xhtml:tr>
       <xhtml:td>list without namespace:</xhtml:td>
       <xhtml:td>
        <xforms:select1 ref="instance('main-ns')/choice/@test">
         <xforms:item>
          <xforms:label>- - no choice - -</xforms:label>
          <xforms:value></xforms:value>
         </xforms:item>
         <xforms:itemset nodeset="instance('list-no-ns')/entities/entity">
          <xforms:label ref="name"/>
          <xforms:value ref="id"/>
         </xforms:itemset>
        </xforms:select1>
       </xhtml:td>
      </xhtml:tr>
     </xhtml:table>
        </xforms:group>

  <xforms:group>
     <xhtml:table>
      <xhtml:tr>
       <xhtml:td>both with namespace:</xhtml:td>
       <xhtml:td>
        <xforms:select1 ref="instance('main-ns')/choice/@test">
         <xforms:item>
          <xforms:label>- - no choice - -</xforms:label>
          <xforms:value></xforms:value>
         </xforms:item>
         <xforms:itemset nodeset="instance('list-ns')/entities/entity">
          <xforms:label ref="name"/>
          <xforms:value ref="id"/>
         </xforms:itemset>
        </xforms:select1>
       </xhtml:td>
      </xhtml:tr>
     </xhtml:table>
        </xforms:group>

 </xhtml:body>
</xhtml:html>

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: item and itemset and namespaces

Erik Bruchez
Administrator
And attached the modified version.

-Erik

Oliver Charlet wrote:

> here is my sample for the xforms sandbox.
>
>
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" >
>  <xhtml:head>
>   <xhtml:title>Test item and itemset in select1</xhtml:title>
>   <xforms:model id="main-model">
>    <xforms:instance id="main-no-ns" xmlns="">
>   <test>
>   <choice test=""/>
>   </test>
>    </xforms:instance>
>    <xforms:instance id="main-ns" xmlns="www.test-me.org">
>   <test>
>   <choice test=""/>
>   </test>
>    </xforms:instance>
>    <xforms:instance id="list-no-ns" xmlns="">
>   <root>
>     <entities>
>      <entity>
> <id>1</id>
> <name>first</name>
> </entity>
>      <entity>
> <id>2</id>
> <name>second</name>
> </entity>
>      <entity>
> <id>3</id>
> <name>third</name>
> </entity>
>     </entities>
>   </root>
>    </xforms:instance>
>    <xforms:instance id="list-ns" xmlns="www.test-me.org">
>   <root>
>     <entities>
>      <entity>
> <id>1</id>
> <name>first</name>
> </entity>
>      <entity>
> <id>2</id>
> <name>second</name>
> </entity>
>      <entity>
> <id>3</id>
> <name>third</name>
> </entity>
>     </entities>
>   </root>
>    </xforms:instance>
>   </xforms:model>
>  </xhtml:head>
>  <xhtml:body>
>   <xhtml:h3>Test item and itemset in select1</xhtml:h3>
> <!--xforms:group ref="instance('main-no-ns')"-->
> <xforms:group>
>      <xhtml:table>
>       <xhtml:tr>
>        <xhtml:td>both without namespace:</xhtml:td>
>        <xhtml:td>
>         <xforms:select1 ref="instance('main-no-ns')/choice/@test">
>          <xforms:item>
>           <xforms:label>- - no choice - -</xforms:label>
>           <xforms:value></xforms:value>
>          </xforms:item>
>          <xforms:itemset nodeset="instance('list-no-ns')/entities/entity">
>           <xforms:label ref="name"/>
>           <xforms:value ref="id"/>
>          </xforms:itemset>
>         </xforms:select1>
>        </xhtml:td>
>       </xhtml:tr>
>      </xhtml:table>
> </xforms:group>
>
>   <xforms:group>
>      <xhtml:table>
>       <xhtml:tr>
>        <xhtml:td>instance without namespace:</xhtml:td>
>        <xhtml:td>
>         <xforms:select1 ref="instance('main-no-ns')/choice/@test">
>          <xforms:item>
>           <xforms:label>- - no choice - -</xforms:label>
>           <xforms:value></xforms:value>
>          </xforms:item>
>          <xforms:itemset nodeset="instance('list-ns')/entities/entity">
>           <xforms:label ref="name"/>
>           <xforms:value ref="id"/>
>          </xforms:itemset>
>         </xforms:select1>
>        </xhtml:td>
>       </xhtml:tr>
>      </xhtml:table>
> </xforms:group>
>
>   <xforms:group>
>      <xhtml:table>
>       <xhtml:tr>
>        <xhtml:td>list without namespace:</xhtml:td>
>        <xhtml:td>
>         <xforms:select1 ref="instance('main-ns')/choice/@test">
>          <xforms:item>
>           <xforms:label>- - no choice - -</xforms:label>
>           <xforms:value></xforms:value>
>          </xforms:item>
>          <xforms:itemset nodeset="instance('list-no-ns')/entities/entity">
>           <xforms:label ref="name"/>
>           <xforms:value ref="id"/>
>          </xforms:itemset>
>         </xforms:select1>
>        </xhtml:td>
>       </xhtml:tr>
>      </xhtml:table>
> </xforms:group>
>
>   <xforms:group>
>      <xhtml:table>
>       <xhtml:tr>
>        <xhtml:td>both with namespace:</xhtml:td>
>        <xhtml:td>
>         <xforms:select1 ref="instance('main-ns')/choice/@test">
>          <xforms:item>
>           <xforms:label>- - no choice - -</xforms:label>
>           <xforms:value></xforms:value>
>          </xforms:item>
>          <xforms:itemset nodeset="instance('list-ns')/entities/entity">
>           <xforms:label ref="name"/>
>           <xforms:value ref="id"/>
>          </xforms:itemset>
>         </xforms:select1>
>        </xhtml:td>
>       </xhtml:tr>
>      </xhtml:table>
> </xforms:group>
>
>  </xhtml:body>
> </xhtml:html>

<?xml version="1.0" encoding="UTF-8"?>
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms"
            xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:test-me="www.test-me.org">
    <xhtml:head>
        <xhtml:title>Test item and itemset in select1</xhtml:title>
        <xforms:model id="main-model">
            <xforms:instance id="main-no-ns" xmlns="">
                <test>
                    <choice test=""/>
                </test>
            </xforms:instance>
            <xforms:instance id="main-ns" xmlns="www.test-me.org">
                <test>
                    <choice test=""/>
                </test>
            </xforms:instance>
            <xforms:instance id="list-no-ns" xmlns="">
                <root>
                    <entities>
                        <entity>
                            <id>1</id>
                            <name>first</name>
                        </entity>
                        <entity>
                            <id>2</id>
                            <name>second</name>
                        </entity>
                        <entity>
                            <id>3</id>
                            <name>third</name>
                        </entity>
                    </entities>
                </root>
            </xforms:instance>
            <xforms:instance id="list-ns" xmlns="www.test-me.org">
                <root>
                    <entities>
                        <entity>
                            <id>1</id>
                            <name>first</name>
                        </entity>
                        <entity>
                            <id>2</id>
                            <name>second</name>
                        </entity>
                        <entity>
                            <id>3</id>
                            <name>third</name>
                        </entity>
                    </entities>
                </root>
            </xforms:instance>
        </xforms:model>
    </xhtml:head>
    <xhtml:body>
        <xhtml:h3>Test item and itemset in select1</xhtml:h3>
        <!--xforms:group ref="instance('main-no-ns')"-->
        <xforms:group>
            <xhtml:table>
                <xhtml:tr>
                    <xhtml:td>both without namespace:</xhtml:td>
                    <xhtml:td>
                        <xforms:select1 ref="instance('main-no-ns')/choice/@test">
                            <xforms:item>
                                <xforms:label>- - no choice - -</xforms:label>
                                <xforms:value></xforms:value>
                            </xforms:item>
                            <xforms:itemset nodeset="instance('list-no-ns')/entities/entity">
                                <xforms:label ref="name"/>
                                <xforms:value ref="id"/>
                            </xforms:itemset>
                        </xforms:select1>
                    </xhtml:td>
                </xhtml:tr>
            </xhtml:table>
        </xforms:group>

        <xforms:group>
            <xhtml:table>
                <xhtml:tr>
                    <xhtml:td>instance without namespace:</xhtml:td>
                    <xhtml:td>
                        <xforms:select1 ref="instance('main-no-ns')/choice/@test">
                            <xforms:item>
                                <xforms:label>- - no choice - -</xforms:label>
                                <xforms:value></xforms:value>
                            </xforms:item>
                            <xforms:itemset nodeset="instance('list-ns')/test-me:entities/test-me:entity">
                                <xforms:label ref="test-me:name"/>
                                <xforms:value ref="test-me:id"/>
                            </xforms:itemset>
                        </xforms:select1>
                    </xhtml:td>
                </xhtml:tr>
            </xhtml:table>
        </xforms:group>

        <xforms:group>
            <xhtml:table>
                <xhtml:tr>
                    <xhtml:td>list without namespace:</xhtml:td>
                    <xhtml:td>
                        <xforms:select1 ref="instance('main-ns')/test-me:choice/@test">
                            <xforms:item>
                                <xforms:label>- - no choice - -</xforms:label>
                                <xforms:value></xforms:value>
                            </xforms:item>
                            <xforms:itemset nodeset="instance('list-no-ns')/entities/entity">
                                <xforms:label ref="name"/>
                                <xforms:value ref="id"/>
                            </xforms:itemset>
                        </xforms:select1>
                    </xhtml:td>
                </xhtml:tr>
            </xhtml:table>
        </xforms:group>

        <xforms:group>
            <xhtml:table>
                <xhtml:tr>
                    <xhtml:td>both with namespace:</xhtml:td>
                    <xhtml:td>
                        <xforms:select1 ref="instance('main-ns')/test-me:choice/@test">
                            <xforms:item>
                                <xforms:label>- - no choice - -</xforms:label>
                                <xforms:value></xforms:value>
                            </xforms:item>
                            <xforms:itemset nodeset="instance('list-ns')/test-me:entities/test-me:entity">
                                <xforms:label ref="test-me:name"/>
                                <xforms:value ref="test-me:id"/>
                            </xforms:itemset>
                        </xforms:select1>
                    </xhtml:td>
                </xhtml:tr>
            </xhtml:table>
        </xforms:group>

    </xhtml:body>
</xhtml:html>


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: item and itemset and namespaces

Oliver Charlet
thanks a lot, Eric

that stuff always gets me. sometimes it's too much for one little programmer's brain.

Erik Bruchez schrieb:
And attached the modified version.

-Erik

Oliver Charlet wrote:
here is my sample for the xforms sandbox.


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

<?xml version="1.0" encoding="UTF-8"?>
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" >
 <xhtml:head>
  <xhtml:title>Test item and itemset in select1</xhtml:title>
  <xforms:model id="main-model">
   <xforms:instance id="main-no-ns" xmlns="">
       <test>
           <choice test=""/>
       </test>
   </xforms:instance>
   <xforms:instance id="main-ns" xmlns="www.test-me.org">
       <test>
           <choice test=""/>
       </test>
   </xforms:instance>
   <xforms:instance id="list-no-ns" xmlns="">
       <root>
    <entities>
     <entity>
         <id>1</id>
         <name>first</name>
     </entity>
     <entity>
         <id>2</id>
         <name>second</name>
     </entity>
     <entity>
         <id>3</id>
         <name>third</name>
     </entity>
    </entities>
           </root>
   </xforms:instance>
   <xforms:instance id="list-ns" xmlns="www.test-me.org">
       <root>
    <entities>
     <entity>
         <id>1</id>
         <name>first</name>
     </entity>
     <entity>
         <id>2</id>
         <name>second</name>
     </entity>
     <entity>
         <id>3</id>
         <name>third</name>
     </entity>
    </entities>
           </root>
   </xforms:instance>
  </xforms:model>
 </xhtml:head>
 <xhtml:body>
  <xhtml:h3>Test item and itemset in select1</xhtml:h3>
    <!--xforms:group ref="instance('main-no-ns')"-->
    <xforms:group>
     <xhtml:table>
      <xhtml:tr>
       <xhtml:td>both without namespace:</xhtml:td>
       <xhtml:td>
        <xforms:select1 ref="instance('main-no-ns')/choice/@test">
         <xforms:item>
          <xforms:label>- - no choice - -</xforms:label>
          <xforms:value></xforms:value>
         </xforms:item>
         <xforms:itemset nodeset="instance('list-no-ns')/entities/entity">
          <xforms:label ref="name"/>
          <xforms:value ref="id"/>
         </xforms:itemset>
        </xforms:select1>
       </xhtml:td>
      </xhtml:tr>
     </xhtml:table>
    </xforms:group>

     <xforms:group>
     <xhtml:table>
      <xhtml:tr>
       <xhtml:td>instance without namespace:</xhtml:td>
       <xhtml:td>
        <xforms:select1 ref="instance('main-no-ns')/choice/@test">
         <xforms:item>
          <xforms:label>- - no choice - -</xforms:label>
          <xforms:value></xforms:value>
         </xforms:item>
         <xforms:itemset nodeset="instance('list-ns')/entities/entity">
          <xforms:label ref="name"/>
          <xforms:value ref="id"/>
         </xforms:itemset>
        </xforms:select1>
       </xhtml:td>
      </xhtml:tr>
     </xhtml:table>
    </xforms:group>

     <xforms:group>
     <xhtml:table>
      <xhtml:tr>
       <xhtml:td>list without namespace:</xhtml:td>
       <xhtml:td>
        <xforms:select1 ref="instance('main-ns')/choice/@test">
         <xforms:item>
          <xforms:label>- - no choice - -</xforms:label>
          <xforms:value></xforms:value>
         </xforms:item>
         <xforms:itemset nodeset="instance('list-no-ns')/entities/entity">
          <xforms:label ref="name"/>
          <xforms:value ref="id"/>
         </xforms:itemset>
        </xforms:select1>
       </xhtml:td>
      </xhtml:tr>
     </xhtml:table>
    </xforms:group>

     <xforms:group>
     <xhtml:table>
      <xhtml:tr>
       <xhtml:td>both with namespace:</xhtml:td>
       <xhtml:td>
        <xforms:select1 ref="instance('main-ns')/choice/@test">
         <xforms:item>
          <xforms:label>- - no choice - -</xforms:label>
          <xforms:value></xforms:value>
         </xforms:item>
         <xforms:itemset nodeset="instance('list-ns')/entities/entity">
          <xforms:label ref="name"/>
          <xforms:value ref="id"/>
         </xforms:itemset>
        </xforms:select1>
       </xhtml:td>
      </xhtml:tr>
     </xhtml:table>
    </xforms:group>

 </xhtml:body>
</xhtml:html>

<?xml version="1.0" encoding="UTF-8"?> <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:test-me="www.test-me.org"> <xhtml:head> <xhtml:title>Test item and itemset in select1</xhtml:title> <xforms:model id="main-model"> <xforms:instance id="main-no-ns" xmlns=""> <test> <choice test=""/> </test> </xforms:instance> <xforms:instance id="main-ns" xmlns="www.test-me.org"> <test> <choice test=""/> </test> </xforms:instance> <xforms:instance id="list-no-ns" xmlns=""> <root> <entities> <entity> <id>1</id> <name>first</name> </entity> <entity> <id>2</id> <name>second</name> </entity> <entity> <id>3</id> <name>third</name> </entity> </entities> </root> </xforms:instance> <xforms:instance id="list-ns" xmlns="www.test-me.org"> <root> <entities> <entity> <id>1</id> <name>first</name> </entity> <entity> <id>2</id> <name>second</name> </entity> <entity> <id>3</id> <name>third</name> </entity> </entities> </root> </xforms:instance> </xforms:model> </xhtml:head> <xhtml:body> <xhtml:h3>Test item and itemset in select1</xhtml:h3> <!--xforms:group ref="instance('main-no-ns')"--> <xforms:group> <xhtml:table> <xhtml:tr> <xhtml:td>both without namespace:</xhtml:td> <xhtml:td> <xforms:select1 ref="instance('main-no-ns')/choice/@test"> <xforms:item> <xforms:label>- - no choice - -</xforms:label> <xforms:value></xforms:value> </xforms:item> <xforms:itemset nodeset="instance('list-no-ns')/entities/entity"> <xforms:label ref="name"/> <xforms:value ref="id"/> </xforms:itemset> </xforms:select1> </xhtml:td> </xhtml:tr> </xhtml:table> </xforms:group> <xforms:group> <xhtml:table> <xhtml:tr> <xhtml:td>instance without namespace:</xhtml:td> <xhtml:td> <xforms:select1 ref="instance('main-no-ns')/choice/@test"> <xforms:item> <xforms:label>- - no choice - -</xforms:label> <xforms:value></xforms:value> </xforms:item> <xforms:itemset nodeset="instance('list-ns')/test-me:entities/test-me:entity"> <xforms:label ref="test-me:name"/> <xforms:value ref="test-me:id"/> </xforms:itemset> </xforms:select1> </xhtml:td> </xhtml:tr> </xhtml:table> </xforms:group> <xforms:group> <xhtml:table> <xhtml:tr> <xhtml:td>list without namespace:</xhtml:td> <xhtml:td> <xforms:select1 ref="instance('main-ns')/test-me:choice/@test"> <xforms:item> <xforms:label>- - no choice - -</xforms:label> <xforms:value></xforms:value> </xforms:item> <xforms:itemset nodeset="instance('list-no-ns')/entities/entity"> <xforms:label ref="name"/> <xforms:value ref="id"/> </xforms:itemset> </xforms:select1> </xhtml:td> </xhtml:tr> </xhtml:table> </xforms:group> <xforms:group> <xhtml:table> <xhtml:tr> <xhtml:td>both with namespace:</xhtml:td> <xhtml:td> <xforms:select1 ref="instance('main-ns')/test-me:choice/@test"> <xforms:item> <xforms:label>- - no choice - -</xforms:label> <xforms:value></xforms:value> </xforms:item> <xforms:itemset nodeset="instance('list-ns')/test-me:entities/test-me:entity"> <xforms:label ref="test-me:name"/> <xforms:value ref="test-me:id"/> </xforms:itemset> </xforms:select1> </xhtml:td> </xhtml:tr> </xhtml:table> </xforms:group> </xhtml:body> </xhtml:html>

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

-- 
-----------------------
oliver charlet
software development

11-041 Olsztyn, Poland

[hidden email]
-----------------------


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws