How do I override upper-case of @href in my keyref document?

I'm setting up a keyref to map href paths for xref linking.  However, SDL converts the @href entry to uppercase.  The output creates a URL that is all upper-case, which renders the link as invalid.

Now I'm forced to adjust my OT plugin to convert the @href to lowercase.  I can understand (slightly) why SDL does this for an @id but why, why does it insist on doing this for a keyref document, which is strictly used for indirection?

Parents
  • Hey Rick,

    You might overcome this issue by tweaking the IWritePluginConfiguration so that the 'ISHSYSHYPERLINKSTOMETADATA' plugin is seperated for ISHMasterDoc, ISHModules and ISHLibrary objects.

    The default OOTB plugin is something as shown below (copied from our Documentation set)

    ----- OOTB plugin configuration -----

    <plugin name="ISHSYSHYPERLINKSTOMETADATA" handler="BlobExtractHyperlinks"
    ishcondition="CurrentAction in ('Create', 'Update', 'Checkin') and (ISHType in ('ISHMasterDoc', 'ISHModule', 'ISHLibrary') and EDT='EDTXML')">
    <description>Find hyperlinks in document and put them on card</description>
    <workingset>
    <ishfields>
    <ishfield name="FISHHYPERLINKS" level="lng" />
    </ishfields>
    </workingset>
    <initialize>
    <parameters>
    <parameter name="ExtractXPath">
    (//*[contains(@class,' topic/xref ')][@href!='-dita-use-conref-target' or not(@conref)][not(ancestor::*[@conref])][not(ancestor-or-self::*[@scope and @scope!=''][position()=1]/@scope='external')]/@href) | (//*[contains(@class,' topic/link ')][@href!='-dita-use-conref-target' or not(@conref)][not(ancestor::*[@conref])][not(ancestor-or-self::*[@scope and @scope!=''][position()=1]/@scope='external')]/@href) | (//*[contains(@class,' map/reltable ')]//*[contains(@class,' map/topicref ')][@href!='-dita-use-conref-target' or not(@conref)][not(ancestor::*[@conref])][not(ancestor-or-self::*[@scope and @scope!=''][position()=1]/@scope='external')]/@href) | (//*[contains(@class,' map/reltable ')]//*[contains(@class,' map/navref ')][@mapref!='-dita-use-conref-target' or not(@conref)][not(ancestor::*[@conref])][not(ancestor-or-self::*[@scope and @scope!=''][position()=1]/@scope='external')]/@mapref)
    </parameter>
    <parameter name="MetadataField">FISHHYPERLINKS</parameter>
    <parameter name="HyperlinkSeparator">#</parameter>
    <parameter name="MetadataUpperCase">Yes</parameter>
    <parameter name="DocumentUpperCase">Yes</parameter>
    <parameter name="AddObjectRef">Yes</parameter>
    </parameters>
    </initialize>
    </plugin>
    ----- end of plugin configuration -----

    As you can see from this configuration, the hyperlink is turned into UpperCase in the document as well. This is based upon the parameter DocumentUpperCase with the value 'Yes'.

    So separating the definition for ISHMasterDoc and ISHModule from the ISHLibrary based objects might allow you to change the DocumentUpperCase parameter value from Yes to No which should prevent the UpperCase feature in the document.

    Please test this out with caution as it might have some other side effects, I'm currently overlooking.

    Kind Regards,

    Raf
  • Thanks for the response. This suggestion seems too radical for my taste. It affects too many, if not all, attributes of our content. I'll continue to control this from the plugin side.
Reply Children
No Data