reading values from a topic map...
Here should go questions about transforming XML with XSLT and FOP.
reading values from a topic map...
I've been trying to use a stylesheet to pass values from a topic file referenced in a map to the Antennal House DITOtoFO stylesheet, and have had no luck. I started by adding a topic file to a sample map . The topic file I added contains the usual 'bookinfo' kind of info:
//prolog/copyrholder
//vrm/@version
//vrm/@release)
//copyryear[1]/@year
//copyryear[2]/@year
I changed the map to look like this:
<map title="Eclipse content aggregated by a map">
<topicref href="bookinfo.xml" type="topic"></topicref>
<topicref href="tasks/changingtheoil.xml" type="task"></topicref>
<topicref href="tasks/organizing.xml" type="task"></topicref>
<topicref href="tasks/shovellingsnow.xml" type="task"></topicref>
<topicref href="tasks/spraypainting.xml" type="task"></topicref>
.
.
.
</map>
If I read against the test file (bookinfo.xml), I can retrieve these values pretty easily. If I try reading the file from the map, I can't seem to get anything. Here's the code I used to test against the bookinfo.xml file:
<xsl:template match="/">
<xsl:value-of select="//prodname"/>
<xsl:variable name="MyCompany" select="concat(//prolog/copyrholder,'Inc.')"/>
<xsl:variable name="version" select="concat(//vrm/@version, '.',//vrm/@release)"/>
<xsl:variable name="copyrdates" select="concat('© ',//copyryear[1]/@year,' – ',//copyryear[2]/@year)"/>
<xsl:variable name="tmblock" select="concat('Copyright ',$copyrdates,' ',$MyCompany, //body)"/>
<xsl:value-of select="$version"/>
</xsl:template>
That works, but when I try to reference the file in the map explicitly, with code that looks like this:
<xsl:template match="//topicref[@href='bookinfo.xml']">
I seem to get a match on the file, but an editor full of white space. I know that I'm missing something, but what that may be, I have no idea.
Any suggestions?
//prolog/copyrholder
//vrm/@version
//vrm/@release)
//copyryear[1]/@year
//copyryear[2]/@year
I changed the map to look like this:
<map title="Eclipse content aggregated by a map">
<topicref href="bookinfo.xml" type="topic"></topicref>
<topicref href="tasks/changingtheoil.xml" type="task"></topicref>
<topicref href="tasks/organizing.xml" type="task"></topicref>
<topicref href="tasks/shovellingsnow.xml" type="task"></topicref>
<topicref href="tasks/spraypainting.xml" type="task"></topicref>
.
.
.
</map>
If I read against the test file (bookinfo.xml), I can retrieve these values pretty easily. If I try reading the file from the map, I can't seem to get anything. Here's the code I used to test against the bookinfo.xml file:
<xsl:template match="/">
<xsl:value-of select="//prodname"/>
<xsl:variable name="MyCompany" select="concat(//prolog/copyrholder,'Inc.')"/>
<xsl:variable name="version" select="concat(//vrm/@version, '.',//vrm/@release)"/>
<xsl:variable name="copyrdates" select="concat('© ',//copyryear[1]/@year,' – ',//copyryear[2]/@year)"/>
<xsl:variable name="tmblock" select="concat('Copyright ',$copyrdates,' ',$MyCompany, //body)"/>
<xsl:value-of select="$version"/>
</xsl:template>
That works, but when I try to reference the file in the map explicitly, with code that looks like this:
<xsl:template match="//topicref[@href='bookinfo.xml']">
I seem to get a match on the file, but an editor full of white space. I know that I'm missing something, but what that may be, I have no idea.
Any suggestions?
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service