[CWB] xml searches...
Graham Ranger
graham.ranger at univ-avignon.fr
Wed Jul 1 15:55:08 CEST 2026
Many thanks for this Stephanie. It works brilliantly.
Best,
Graham.
Le 01/07/2026 à 11:52, Stephanie Evert a écrit :
>
>> Is there any way I can search for xml tags inside other xml tags? Something like
>> n: <orw>[]+</orw> :: n.div2_n="1";
> You need to set the label on some token within the region, typically the first one:
>
> <orw> n:[] []* </orw> :: n.div2_n="1";
>
> Or you could use the implicitly defined match or matchend anchors as long as the region of interest is at the start or end of the query:
>
> <orw>[]+</orw> :: match.div2_n="1";
>
> Another – faster – option is to do the check inline, but I generally prefer the global constraint for readability:
>
> <orw> [ _.div2_n="1" ] []*</orw> ::
>
> Best,
> Stephanie
>
>> (which doesn't work, as it is gross improvisation!).
>> Many thanks in advance for any help!
>> Best,
>> Graham.
>> _______________________________________________
>> CWB mailing list
>> CWB at sslmit.unibo.it
>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>
>
>
>
More information about the CWB
mailing list