create empty tags with elements in xslt output

admin

Administrator
Staff member
All the examples I'm finding online and in my books seem to assume that I want to take xml, process it with an xslt, and create html output. What I'm having trouble with (beyond some really basic stuff) is taking xml, processing it with an xslt, and creating a new form of xml as my output.

To be more specific, I need to export output from FileMaker and use an xslt to turn it into an xml file that can be read by another program -- MindManager ProX5 from Mindjet in this case.

The problem I'm having is that the xml that MindManager needs doesn't take its data from elements between 2 tags, but rather from the attribute of an empty tag. For example, I'm used to looking at:


<Topic>
Hello World
</Topic>


Which I can produce with a simple xsl:for-each statement like:

<xsl:for-each select="fmp:ROW">
<Topic>
<xsl:value-of select="fmp:SomeFileMakerField" />
</Topic>
</xsl:for-each>


But MindManager wants it to look like this:


<ap:Text PlainText="Hello World" />


So, how do I structure my xslt so that I can create this kind of tag with an attribute as the result? How do I get around the problem that the tag's beginning with <ap: seems to be another problem because of the colon?

Any help or direction to resources on this topic is appreciated.

PS -- anyone else working with MindManager?

Thanks,

Dan
 
Back
Top