Ok, this can be done, but PHP is probably neither needed nor the most elegant solution. One way to implement this would be (based on your example):

<ui:group>
    <ui:if ui:condition="{= ?param = 'person' }">
<my:Helper arg:resultSet="{# SELECT ?x WHERE { ?x a kennedys:Person } }"/>
    </ui:if>
    <ui:else>
<my:Helper arg:resultSet="{# SELECT ?x WHERE { ?x a kennedys:College } }"/>
    </ui:else>
</ui:group>

where my:Helper is a user-defined element class that takes a resultSet as argument and lists it as output. (arg:resultSet above would be a subproperty of ui:resultSet.)

    http://uispin.org/ui.html#classes

For the example above there are more elegant approaches, such as using ui:call with a template that is selected by a SPIN function, or make the class (Person/College) a variable that is computed by a SPIN function.

If all you need from PHP is the control logic (e.g. if) then SWP can be used just as well. If you really need PHP, I believe you would need to generate temp PHP files on the server in one transaction, and then call that PHP script in a second step, using Ajax.

Holger

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en


Reply via email to