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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

dmRef the reference text is concatenated in the PDF output

GregoryMackenzi
12-Amethyst

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

Top Tags