Placing Hyperlinks via IDML


i've managed put few xsl stylesheets , scripts transform own 'markup' idml. (i found convenient and reliable method automate placing footnotes.)

 

to that, i've consulted idml specifications adobe, official 'cookbook'; , i've tested xmls adobe's own schemas; , working fine documents produced—with single exception: hyperlinks (to refer text anchors within same document).

 

when i'm referencing 'static' bits of text inside same document, prefer hyperlinking on cross-referencing, in former allows me use text links. on hyperlinks panel, and story editor, do see idml-placed hyperlinks; when exported pdf or html, don't work. more precisely, one or two of them work expected, , rest broken; although there's absolutely no visible difference between 'source code' 2 kinds.

 

acrobat recognizes of 'hyperlinktextdestination's, not links themselves; , exporting idml/re-importing .indd doesn't either.

 

this hugely frustrating. now—i'd grateful if tell me what's wrong link sources , destinations, , forth, refuse work. hope it's i'm making careless mistake xml attributes , such:

 

 

this how 'hyperlinktextsource' looks, inside main story xml:

 

<characterstylerange appliedcharacterstyle="characterstyle/$id/[no character style]">

<hyperlinktextsource self="#the unique id of destination, assigned me#" name="#uniquely generated (random) name#" hidden="false" appliedcharacterstyle="n">

<content>#the bit of text serve link#</content>

</hyperlinktextsource>

</characterstylerange>

 

 

my 'hyperlinktextdestination's this, inside main story xml:

 

<hyperlinktextdestination self="hyperlinktextdestination/#the unique id of destination, assigned me#" name="#unique (random) name#" hidden="false"/>

 

 

and this, hyperlink specification inside designmap.xml:

 

<hyperlink self="#unique (random) name#" name="#unique id of destination, assigned me#" source="#unique id of destination, assigned me#" visible="false" highlight="none" width="thin" borderstyle="solid" hidden="false">

<properties>

<bordercolor type="enumeration">black</bordercolor>

<destination type="object">hyperlinktextdestination/#unique id of destination, assigned me#</destination>

</properties>

</hyperlink>

 

 

this bit of xslt produces 'source':

 

<xsl:template match="#my chosen element name links#">

<characterstylerange appliedcharacterstyle="characterstyle/$id/[no character style]">

       <hyperlinktextsource self="{@linkend#the unique id of destination#}" name="{@linkend}_{generate-id(.)}" hidden="false" appliedcharacterstyle="n">

       <content><xsl:value-of select="."/></content>

</hyperlinktextsource>

</characterstylerange>

</xsl:template>

 

 

the destination producer:

 

<hyperlinktextdestination self="hyperlinktextdestination/{@id#the unique id, assigned me#}" name="{@id#...same before#}" hidden="false"/>

 

 

and, responsible hyperlink elements inside designmap.xml:

 

<hyperlink self="{@linkend}dest{generate-id(.)}" name="{.}" source="{@linkend}" visible="false" highlight="none" width="thin" borderstyle="solid" hidden="false">

<properties>

<bordercolor type="enumeration">black</bordercolor>

<destination type="object">hyperlinktextdestination/<xsl:value-of select="@linkend"/></destination>

</properties>

</hyperlink>

 

ps. don't transform indesign-xmlelements; of becomes regular text. don't think it's worth hassle: id's xml-handling capabilities rudimentary.



More discussions in InDesign


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support