Skip to main content
Feb 11, 2014 1:37 PM UTC
Question

dmRef the reference text is concatenated in the PDF output

I found another problem, new day new problem right... 😉



I noticed that in the AAD S1000D PDF output (Editor 5.3, CSDB 4.3 M060)
the dmRef outputs a data module code and there is a missing space
between the end of the DMC and the <techname> and also between the
<techname> and infoName, so you get something like
"STUF-A-34-52-01-00A-300A-DWidget Part No. 007Examination tests and
checks" when it should be "STUF-A-34-52-01-00A-300A-D Widget Part No.
007 Examination tests and checks ".


    8 replies

    Feb 11, 2014 3:21 PM UTC
    Further to this, I noticed that the PDF file does not have a dash
    between the techName and infoName elements and when I search for
    infoName for example I cannot find an example that doesn't have a dash,
    for example the following code from foRevSegDatamodule.xsl inserts a
    dash between the techname and infoname elements:



    <xsl:value-of select="techname"/">-<xsl:value-of<br/>select="infoname"/>



    Also, I can't help but notice that the stylesheet case does not match
    the element names so we have "techname" and "infoname" above instead of
    the camel case.



    What I'm wondering is how the dmRef is arriving in the PDF without a
    dash. There has to be something somewhere processing this.


    Feb 11, 2014 3:35 PM UTC
    Actually, there may be another reason why I am getting the concatenated reference. I can't find a rule without a dash, so I'm considering the possibility there is no rule which matches the markup in this context, therefore the text within the <dmrefaddressitems> markup is rendered as it is, which turns out to be, no spaces. This is the same problem I think as my issue with superscript, the markup is there but there was no rule to match, so the character data was simply output as it was.
    Feb 11, 2014 4:00 PM UTC
    Ok, I figured it out, it needed a template match, I put a new xsl:template match at the end of foPara.xsl, and I changed the element names to camel case, "dmTitle", "techName", "infoName". I also modified some of the non breaking spaces "" to plain spaces " " as this is used in the context of a paragraph. Here is the code:



    <xsl:template match="dmTitle">
    <xsl:value-of select="techName"/"> - <xsl:value-of select="infoName"/">
    </xsl:template>


    </xsl:stylesheet>

    It works. 🙂
    Feb 11, 2014 4:21 PM UTC
    The magic of XSL. 🙂
    Feb 11, 2014 4:24 PM UTC
    I feel like Sherlock Holmes this morning. 😉
    Feb 11, 2014 4:25 PM UTC
    XSL development is often like that....
    Feb 11, 2014 4:29 PM UTC
    And so satisfying when it finally works! 🙂
    Feb 11, 2014 4:37 PM UTC
    Indeed.