Skip to content

Instantly share code, notes, and snippets.

@NKame
Last active October 10, 2016 09:20
Show Gist options
  • Save NKame/6c6203f74cc6acacb4142b4f40745cc7 to your computer and use it in GitHub Desktop.
Save NKame/6c6203f74cc6acacb4142b4f40745cc7 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://graphml.graphdrawing.org/xmlns"
xmlns:tns="http://graphml.graphdrawing.org/xmlns">
<xsl:template match="tns:edge">
<xsl:element name="edge" namespace="http://graphml.graphdrawing.org/xmlns">
<xsl:attribute name="id"><xsl:value-of
select="tns:data[@key='edgeid']/text()" /></xsl:attribute>
<xsl:apply-templates select="@*" />
<xsl:apply-templates />
</xsl:element>
</xsl:template>
<xsl:template match="tns:data[@key='edgeid']" />
<xsl:template match="tns:key[@id='edgeid']" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
@NKame
Copy link
Author

NKame commented Oct 7, 2016

gephi #tinkerpop #graphml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment