cheat sheets for code templates
Are you missing a feature? Request its implementation here.
-
- Posts: 1
- Joined: Tue Dec 21, 2010 9:19 pm
cheat sheets for code templates
Post by jomclaughlin »
Hi,
Do you guys have printable cheat sheets for code templates? I searched around the web site and didn't see anything. This would be quite helpful for noobs like me.
Do you guys have printable cheat sheets for code templates? I searched around the web site and didn't see anything. This would be quite helpful for noobs like me.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: cheat sheets for code templates
Hello,
I'm afraid we don't have something like this on the site.
But I'll see if we can generate a code templates "cheat sheet" for you.
Regards,
Adrian
I'm afraid we don't have something like this on the site.
But I'll see if we can generate a code templates "cheat sheet" for you.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: cheat sheets for code templates
Hi,
The code templates can be exported as an XML file from Options->Preferences -- Editor / Templates / Code Templates -- Export.
Then you can just write a simple XSLT stylesheet to generate a cheat sheet with the information you like in the format you like. As an example the stylesheet below generates a simple HTML cheat sheet:
Best Regards,
George
The code templates can be exported as an XML file from Options->Preferences -- Editor / Templates / Code Templates -- Export.
Then you can just write a simple XSLT stylesheet to generate a cheat sheet with the information you like in the format you like. As an example the stylesheet below generates a simple HTML cheat sheet:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/">
<html>
<head>
<title>Cheat sheet</title>
</head>
<body>
<xsl:for-each-group select="//codeTemplateItem"
group-by="field[@name='contentType']/String">
<h1>
<xsl:text>Templates for </xsl:text>
<xsl:value-of select="current-grouping-key()"/>
</h1>
<table border="1">
<tr bgcolor="AAAAAA">
<th>Name</th>
<th>Description</th>
</tr>
<xsl:apply-templates select="current-group()">
<xsl:sort select="field[@name='renderString']/String"/>
</xsl:apply-templates>
</table>
</xsl:for-each-group>
</body>
</html>
</xsl:template>
<xsl:template match="codeTemplateItem">
<tr bgcolor="{if (position() mod 2 = 0) then 'DDDDFF' else 'FFFFDD'}">
<td><xsl:value-of select="field[@name='renderString']/String"/></td>
<td><xsl:value-of select="field[@name='descriptionString']/String"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
George
George Cristian Bina
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