Skip to content

Instantly share code, notes, and snippets.

@questsin
Created June 28, 2012 01:28
Show Gist options
  • Save questsin/3008108 to your computer and use it in GitHub Desktop.
Save questsin/3008108 to your computer and use it in GitHub Desktop.
Convert Evernote .enex file to Archi .archimate using XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:archimate="http://www.bolton.ac.uk/archimate" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
<xsl:output method="xml" media-type="text/xml"/>
<xsl:template match="/">
<archimate:model id="{generate-id()}" version="2.2.1" name="Evernote2Archi">
<folder type="business" id="{generate-id()}" name="Evernote2Archi">
<xsl:for-each select="/en-export/note">
<element id="{generate-id()}" xsi:type="archimate:Representation" name="{title}">
<documentation>
<xsl:value-of select="content"/>
</documentation>
<xsl:for-each select="/en-export/note/tag">
<property value="{.}" key="tag"/>
</xsl:for-each>
<property value="{created}" key="created"/>
<property value="{updated}" key="updated"/>
<property value="{note-attributes/latitude}" key="latitude"/>
<property value="{note-attributes/longitude}" key="longitude"/>
<property value="{note-attributes/altitude}" key="altitude"/>
<property value="{note-attributes/author}" key="author"/>
<property value="{note-attributes/source}" key="source"/>
<property value="{note-attributes/source-url}" key="source-url"/>
</element>
</xsl:for-each>
</folder>
<property value="{en-export/@application}" key="application"/>
<property value="{en-export/@export-date}" key="export-date"/>
<property value="{en-export/@version}" key="version"/>
<purpose>Evernote 2 Archimate via XSLT</purpose>
</archimate:model>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment