James;  The core of the problem culminates from JSP's JSTL, EL and the
"core" standard tag library.  It all comes down to JSP supporting Java
types, but not explicitly in JSP tags.  This makes it confusing as it
is unclear where to go to get answers, but best fits into the category
of the JSP Expression Language (EL).  The J2EE tutorial does a decent
job of stating the syntax, operators, coercion, etc. that you can
expect:
  http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html or
  http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html

In this case, you're on the right track to use the xsd match (i.e.
'1^^xsd:integer'), but JSP will see this as a string, not an integer.
Therefore the following should work
   aRow.maxcardi eq '^^http://www.w3.org/2001/XMLSchema#integer'

-- Scott

On Dec 18, 5:33 pm, jlapalme <[email protected]> wrote:
> Hi,
>
> I have a JSP template with the following :
>
> <c:choose>
>   <c:when test="${aRow.maxcardi != null}">
>      something
>  </c:when>
>  <c:otherwise>
>    something else
>  </c:otherwise>
> </c:choose>
>
> the used query is :
>
> SELECT DISTINCT ?prop ?maxcardi
> WHERE{
>         ?aClass tops:subClassOf ?ancestor.
>         ?ancestor rdfs:subClassOf ?subRestrict .
>         ?subRestrict a owl:Restriction.
>         ?subRestrict owl:onProperty ?prop .
>         LET (?maxcardi := smf:maxCardinality(?aClass, ?prop)) .
>
> } ORDER BY ?label
>
> It work fine.
>
> If I change the JSP to :
>
> <c:choose>
>   <c:when test="${aRow.maxcardi != null and aRow.maxcardi ==
> '1^^xsd:integer'}">
>      something
>  </c:when>
>  <c:otherwise>
>    something else
>  </c:otherwise>
> </c:choose>
>
> I does not give the correct result. aRow.maxcardi even if equal to 1
> does not match the test.
> I know the value is one because I have tested it with a sparql query
> in TBC.
> What is the problem. Also, will I be able to use operators other then
> == and != such as > and <.
>
> The management of variable typing in the JSP-SPARQL stuff is very hard
> to use....
>
> cheers,
>
> James
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
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-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to