Bug #2520

Mis à jour par Serge Heiden il y a plus de 4 ans

Currently CQP manages tag recursion by renaming nested tags (and attributes) with a suffix index: tag/tag/tag -> tag/tag1/tag2.

So in TEI context,
cwb-encode renames nested div tags with div1, div2, etc. depending on the depth of the div.

If the sources contain div1 or div2, etc. tags, there is a name conflict, at least in the declaration of the structures in the REGISTRY:
<pre>
attributes:setup_attribute(): Warning:
Attribute div1 of type Structural Attribute already defined in corpus teig
REGISTRY ERROR (../registry/teig): Structure attribute div1 declared twice -- semantic error
REGISTRY ERROR (../registry/teig): Parse Error.
</pre>

extract of the registry file:
<pre>
$ grep -i div1 ../registry/teig
# <div1 n=".."> ... </div1>
STRUCTURE div1
STRUCTURE div1_n # [annotations]
# (3 levels of embedding: <div>, <div1>, <div2>, <div3>).
STRUCTURE div1

</pre>

-> and the corpus is not useable.

h3. Solution 0

Always use the 'div0123456todiv.xsl' XSLT stylesheet in the 2-front step of XTZ for XML-TEI encoded sources.

h3. Solution 1

Don't declare structures twice.

h3. Solution 2

Re-implement recursion management to prevent such conflicts.

Retour