template uris and observes

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

template uris and observes

rvj

Does anyone know if "observes" should recognise template generated uri
references  ??


Having played around a bit more Ive discovered that the same ID isnt
repeated in the DOM


 <template>
          <element   uri="rdf:*"  id="proto"          />
        </template>

so given a datasource with

    <ns1:element about="urn:0"      />
    <ns1:element about="urn:1"     />

and iterating the getelementsbytagname('element') array  generates

    0    proto
    1    urn:0
    2    urn:1


I then tried to get some XUL element to observe these IDs within a
broadcasterset

  <broadcasterset  flex="1"       datasources="..." ref="prompt:variants" >
            <template>
                  <broadcaster  uri="rdf:*"  id="proto"      />
            </template>
     </broadcasterset>


<description id="demo1" value="test 1" observes="urn:0" />
<description id="demo2" value="test 2" observes="urn:1" />


but without sucess .


1.Should uri observe references work  ??


PS I also tried changing the uri attribute using DOM methods. At the DOM
level this seems to work
except that observes does not fire

            // before elements[1].getAttribute('id') returns urn:1

            elements[1].setAttribute('id',"test1")

            // after  elements[1].getAttribute('id') returns test1

but again observes fails to fire

<description id="demo1" value="test 1" observes="test1" />
<description id="demo2" value="test 2" observes="test2" />

2. Should dom attribute id changes work?








_______________________________________________
dev-tech-rdf mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-rdf
Reply | Threaded
Open this post in threaded view
|

Re: template uris and observes

Neil-4
rvj wrote:

>Does anyone know if "observes" should recognise template generated uri references  ??
>
I wouldn't be surprised if it didn't. For instance, I've found that you
can't usefully overlay a broadcaster element.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-tech-rdf mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-rdf