Page 1 of 1

Searching for attributes (customizing search?) in the author

Posted: Mon Jun 23, 2014 11:08 am
by afuchs
Dear Board Members,

In a large body of XML data representing a critical-historical edition in a loose interpretation of NLM Book DTD, a number of people is working through the authoring tool.

The actual text of the edition has hard line breaks with hyphenation, which makes it difficult to find words that are broken and hyphenated. To make them retrievable, the restored word form without hyphens has been put into an attribute of the milestone element that codes line breaks.

E.g.

Code: Select all


<milestone-start />
...you cannot find the word hyphe-
<milestone-end />
<milestone-start specific-use="hyphenation"/>
nation in this document, can you?
<milestone-end />
In the example, the word "hyphenation" can only be found in text mode, not in author mode. Is it possible to allow the attribute search in a friendly/custom way for the users of the author mode?

Thank you in advance,
A.Fuchs

Re: Searching for attributes (customizing search?) in the au

Posted: Mon Jun 23, 2014 11:59 am
by Radu
Dear Alexey,

In the Author editing mode the Find/Replace dialog only searches in editable content. Attribute names and values are not directly editable in the Author editing mode and thus they cannot be found using the regular find/replace functionality.
In the main Find menu there is a Find All Elements... action which can be used to search for all XML elements with a certain attribute name or value.
Maybe as another approach you could convert the specific-use attribute to an XML element with the same name styled in a specific way in the CSS.
Or use our Java-based API to implement your own Find/Replace widget but this would take some implementation effort on your side.

Regards,
Radu

Re: Searching for attributes (customizing search?) in the au

Posted: Mon Jun 23, 2014 3:29 pm
by afuchs
Thank you, Radu,

While the "Find all elements..." suggestion is a viable workaround, and would suffice, I'd still like to understand what you are suggesting further.

Where would the conversion of the attribute into an element (and back) take place? I am not supposed to alter the schema, so I do not see on what stage in the editing process the transformation could take place so as not to cause invalidity. Probably I misconstrue your meaning due to lack of experience on my part. I'd be thankful for an example or some further elaboration.

Regards,
Alexey

Re: Searching for attributes (customizing search?) in the au

Posted: Mon Jun 23, 2014 3:35 pm
by Radu
Hi Alexey,

My alternate suggestion was based on the possibility that you could alter your schema.

Regards,
Radu