Hi Darin,
In 4.2 you'd need to either stack constraints (or write a custom constraint).
Stacking as in:
<constraint name="prop">
<properties/>
</constraint>
<constraint name="aggregation">
<value>
<element ns="http://prismstandard.org/namespaces/basic/2.0/"
name="aggregationType"/>
</value>
</constraint>
And the query text that looks like
[prop:aggregation:somevaluetomatch]
If you went the custom-constraint route, you'd need to emit something wrapped
with <cts:properties-query>.
Lastly, in 5.0 there is a way to set up a fragment-scope out of the box. :)
Thanks, -m
On Oct 14, 2011, at 11:27 AM, Darin McBeath wrote:
I would like to restrict a query to a specific QName in the properties
fragment. However, I can't seem to get this to work. I thought that I could
specify something like the following (but it does not work). By not work, I
mean it doesn't raise an error it simply returns 0 results.
<constraint name="aggregation">
<properties/>
<value>
<element ns="http://prismstandard.org/namespaces/basic/2.0/"
name="aggregationType"/>
</value>
</constraint>
When I use a constraint like the following, I can get my expected result ...
but, I'm searching all of the QNames in the properties fragment (which is not
what I want).
<constraint name="aggregation">
<properties/>
</constraint>
I did verify (when not using the properties fragment) that something like the
following would work.
<constraint name="aggregation">
<value>
<element ns="http://prismstandard.org/namespaces/basic/2.0/"
name="aggregationType"/>
</value>
</constraint>
I guess my question is whether one can use a combination of 'value' and
'properties' for a constraint. I saw a post earlier this summer (asking a
slightly different question). So, I'm kind of guessing that the answer is to
write a custom constraint. Anyway, let me know if I'm missing something here
... if this is not supported, then one would think this is something that
should be. Minimally, if it is not supported an error should be raised rather
than silently returning no results.
Darin.
_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general