Skip to content
Snippets Groups Projects
Commit 619c76d9 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

klv.convert.one.file

parent 0487dbd7
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!--
title : ExtractPcapngValues.xslt
created : 3 September 2021
creator : Don Brutzman and Terry Norbraten
description : Extract contained Values from DFDL pgapng results convert it to text file
reference : TODO.xml
reference : https://www.w3.org/TR/xslt
identifier : https://www.web3d.org/x3d/stylesheets/AllX3dElementsAttributesTextTemplate.xslt
license : license.html
-->
<!-- TODO authors can edit this example to customize all transformation rules -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:xs ="http://www.w3.org/2001/XMLSchema"
xmlns:fn ="http://www.w3.org/2005/xpath-functions">
<!-- extension-element-prefixes="xs" -->
<xsl:output method="text"/> <!-- output methods: xml html text -->
<!-- ======================================================= -->
<xsl:template match="/"> <!-- process root of input document -->
<!-- process elements and comments -->
<xsl:apply-templates select="*"/> <!-- comment() -->
</xsl:template>
<!-- ===================================================== -->
<xsl:template match="*"> <!-- rule to process each element -->
<xsl:apply-templates select="*"/> <!-- recurse on children -->
</xsl:template>
<xsl:variable name="retainNewLines" select="true()"/>
<xsl:template match="Data"> <!-- rule to process each element of interest -->
<!-- common initial processing for each element
<xsl:text disable-output-escaping="yes">&lt;</xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text disable-output-escaping="yes">&gt;</xsl:text> -->
<xsl:apply-templates select="@*"/> <!-- process attributes for this element, should be none -->
<xsl:value-of select="."/> <!-- hexadecimal digits, variable length, little-endian byte order -->
<!-- common final processing for each element
<xsl:text disable-output-escaping="yes">&lt;</xsl:text>
<xsl:text disable-output-escaping="yes">/</xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text disable-output-escaping="yes">&gt;</xsl:text> -->
<xsl:if test="$retainNewLines">
<xsl:text>&#10;</xsl:text>
</xsl:if>
</xsl:template>
<!-- ===================================================== -->
<xsl:template match="@*"> <!-- rule to process each attribute -->
<!-- common processing for each attribute: ignore, not expected
<xsl:text> </xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text>='</xsl:text>
<xsl:value-of select="."/>
<xsl:text>'</xsl:text> -->
</xsl:template>
<!-- ===================================================== -->
<xsl:template match="comment()"> <!-- rule to process each comment, though not expected -->
<xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
<xsl:value-of select="."/>
<xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
<xsl:text>&#10;</xsl:text>
</xsl:template>
</xsl:stylesheet>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment