The HTML::Parse solution worked but an unexpected side effect had to do with inflection data (identified by "infl=" )that I did not see prior to posting. Below I've posted the result from an entry created with the Parser solution. I now realized I need to create the main headword with an alternate spelling but exclude the creation of inflectional data for the non-sensical word. I guess I need to exclude the creation of new inflection data for it to work correctly to avoid creating non-sensical inflection data.

<idx:short><div height="4"><a name="83"/><div><idx:orth value="abändern" infl="abändere,abänderen,abänderest,abänderet,abändern,abänderst,abändert,abänderte,abänderten,abändertest,abändertet,abgeändert,abzuändern"/><idx:orth value="abaendern" infl="abaendere,abaenderen,abaenderest,abaenderet,abaendern,abaenderst,abaendert,abaenderte,abaenderten,abaendertest,abaendertet,abgeaendert,abzuaendern"/><betonung/><b><b>a</b></b><b>b</b>·<b>än</b>·<b>dern </b>&#139;sw. V.; hat&#155;: </div><blockquote><blockquote><div width="-70"><img hspace="0" vspace="0" align="middle" hisrc="bbm/rectangle-php/40-1-h.gif" src="bbm/rectangle-php/40-1-m.gif"/><B>1.</B> ein wenig, in Teilen ändern: <i>das Testament, den Antrag, Beschluss, das Programm a. </i> </div></blockquote><blockquote><div width="-70"><img hspace="0" vspace="0" align="middle" hisrc="bbm/rectangle-php/40-1-h.gif" src="bbm/rectangle-php/40-1-m.gif"/><B>2.</B> (BIOL.) (durch Mutation od. Umwelt) in den Artmerkmalen variieren, sich wandeln: <i>die Farben der Blüten ändern stark ab.</i> </div></blockquote></blockquote></div></idx:short></idx:entry><div height="10" align="center"><img hspace="0" vspace="0" align="middle" losrc="bbm/rectangle-php/150-1-U35555555-l.gif" hisrc="bbm/rectangle-php/520-4-U35555555-h.gif" src="bbm/rectangle-php/200-1-U35555555-m.gif"/><br/></div>

I know it is a lot to ask, but is there anyone that can suggeset a change to the html:: parse script above to prevent the inflectional data from being produced? My desired result is below.

<idx:short><div height="4"><a name="83"/><div><idx:orth value="abändern" infl="abändere,abänderen,abänderest,abänderet,abändern,abänderst,abändert,abänderte,abänderten,abändertest,abändertet,abgeändert,abzuändern"/><idx:orth value="abaendern"><betonung/><b><b>a</b></b><b>b</b>·<b>än</b>·<b>dern </b>&#139;sw. V.; hat&#155;: </div><blockquote><blockquote><div width="-70"><img hspace="0" vspace="0" align="middle" hisrc="bbm/rectangle-php/40-1-h.gif" src="bbm/rectangle-php/40-1-m.gif"/><B>1.</B> ein wenig, in Teilen ändern: <i>das Testament, den Antrag, Beschluss, das Programm a. </i> </div></blockquote><blockquote><div width="-70"><img hspace="0" vspace="0" align="middle" hisrc="bbm/rectangle-php/40-1-h.gif" src="bbm/rectangle-php/40-1-m.gif"/><B>2.</B> (BIOL.) (durch Mutation od. Umwelt) in den Artmerkmalen variieren, sich wandeln: <i>die Farben der Blüten ändern stark ab.</i> </div></blockquote></blockquote></div></idx:short></idx:entry><div height="10" align="center"><img hspace="0" vspace="0" align="middle" losrc="bbm/rectangle-php/150-1-U35555555-l.gif" hisrc="bbm/rectangle-php/520-4-U35555555-h.gif" src="bbm/rectangle-php/200-1-U35555555-m.gif"/><br/></div>

In reply to Re^2: Copy html tag and replace umlauts with alternate spellings by Anonymous Monk
in thread Copy html tag and replace umlauts with alternate spellings by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.