Searching for attributes (customizing search?) in the author

Post here questions and problems related to oXygen frameworks/document types.
afuchs
Posts: 19
Joined: Mon May 19, 2014 11:38 am

Searching for attributes (customizing search?) in the author

Post 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
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
afuchs
Posts: 19
Joined: Mon May 19, 2014 11:38 am

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

Post 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
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu »

Hi Alexey,

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

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply