cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

dmRef the reference text is concatenated in the PDF output

GregoryMackenzi
1-Newbie

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 8

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.


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.

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. 🙂

The magic of XSL. 🙂

I feel like Sherlock Holmes this morning. 😉

XSL development is often like that....

And so satisfying when it finally works! 🙂

Indeed.
Top Tags