Skip to main content
1-Visitor
February 11, 2014
Question

dmRef the reference text is concatenated in the PDF output

  • February 11, 2014
  • 8 replies
  • 1521 views
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

    1-Visitor
    February 11, 2014
    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.


    1-Visitor
    February 11, 2014
    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.
    1-Visitor
    February 11, 2014
    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. 🙂
    18-Opal
    February 11, 2014
    The magic of XSL. 🙂
    1-Visitor
    February 11, 2014
    I feel like Sherlock Holmes this morning. 😉
    18-Opal
    February 11, 2014
    XSL development is often like that....
    1-Visitor
    February 11, 2014
    And so satisfying when it finally works! 🙂
    18-Opal
    February 11, 2014
    Indeed.