[CWB] [ cwb-Bugs-2888416 ] CQPweb: hyphens in handles

SourceForge.net noreply at sourceforge.net
Sat Nov 28 09:37:08 CET 2009


Bugs item #2888416, was opened at 2009-10-29 00:35
Message generated for change (Comment added) made by andrewhardie
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=722303&aid=2888416&group_id=131809

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: CQPweb
Group: None
Status: Closed
Resolution: Postponed
Priority: 9
Private: No
Submitted By: Andrew Hardie (andrewhardie)
Assigned to: Andrew Hardie (andrewhardie)
Summary: CQPweb: hyphens in handles

Initial Comment:
"handles", ie internal labels for corpora, annotations, metadata fields, metadata values, queries, subcorpora and pretty much everything else, are currently restricted to \w characters.

HOWEVER, CWB/CQP allows identifiers like corpus names to include hyphens. CQPweb then fails to support these.

Solution: allow [\w-] in handles.
Prognosis: could be quite tricky to implement without introducing bugs. Lots of places in the code will need changing.

----------------------------------------------------------------------

>Comment By: Andrew Hardie (andrewhardie)
Date: 2009-11-28 08:37

Message:
Ideally, we should allow hyphens in the CWB name, but not in the mysql
name. That would solve all the problems.

But this will require all those bugs to be resolved that are based on the
assumption that cwb and cqp names are identical bar case.

----------------------------------------------------------------------

Comment By: Andrew Hardie (andrewhardie)
Date: 2009-11-11 20:17

Message:
On some further reflection, this won't work: handles are used in mysql
table and column names. Unless they are backtick-quoted, these names cannot
contain hyphen.

So, cqpweb_handle_enforce() has gone back to enforcing \w. 

----------------------------------------------------------------------

Comment By: Andrew Hardie (andrewhardie)
Date: 2009-11-10 21:57

Message:
Function cqpweb_handle_enforce() implements this. All handle-enforcing
should use this function.

There is also a Boolean return version, cqpweb_handle_check().

Both in library.inc.php

However this bug remains open because this function is not used at --all--
the points where it is needed yet.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=722303&aid=2888416&group_id=131809


More information about the CWB mailing list