<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (c) 2013 – The MITRE Corporation
  All rights reserved. See LICENSE.txt for complete terms.
 -->
<!--
STIX XML to HTML transform v1.0
Compatible with CybOX v2.0

This is an xslt to transform a STIX 2.0 document into html for easy viewing.  
CybOX observables, Indicators & TTPs are supported and turned into collapsible 
HTML elements.  Details about structure's contents are displayed in a
format representing the nested nature of the original document.

Objects which are referred to by reference can be expanded within the context
of the parent object, unless the reference points to an external document

This is a work in progress.  Feedback is most welcome!

requirements:
 - XSLT 2.0 engine (this has been tested with Saxon 9.5)
 - a STIX 2.0 input xml document
 
Created 2013
<EMAIL>
<EMAIL>
  
-->

<xsl:stylesheet version="2.0"
  xmlns:stix="http://stix.mitre.org/stix-1"
  xmlns:cybox="http://cybox.mitre.org/cybox-2"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:fn="http://www.w3.org/2005/xpath-functions"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:indicator="http://stix.mitre.org/Indicator-2"
  xmlns:TTP="http://stix.mitre.org/TTP-1"
  xmlns:COA="http://stix.mitre.org/CourseOfAction-1"
  xmlns:capec="http://stix.mitre.org/extensions/AP#CAPEC2.5-1"
  xmlns:marking="http://data-marking.mitre.org/Marking-1"
  xmlns:tlpMarking="http://data-marking.mitre.org/extensions/MarkingStructure#TLP-1"
  xmlns:stixVocabs="http://stix.mitre.org/default_vocabularies-1"
  xmlns:cyboxCommon="http://cybox.mitre.org/common-2"
  xmlns:cyboxVocabs="http://cybox.mitre.org/default_vocabularies-2"
  xmlns:stixCommon="http://stix.mitre.org/common-1"
  xmlns:EmailMessageObj="http://cybox.mitre.org/objects#EmailMessageObject-2"
  exclude-result-prefixes="cybox xsi fn EmailMessageObj">

  <xsl:output method="html" omit-xml-declaration="yes" indent="yes" media-type="text/html"
    version="4.0"/>
  
  <!--
    how to set parameters: xslt stylesheet parameters should be passed in via
    whatever mechanism the xslt engine has.  saxon allows you to set parameters
    via the command-line or via the java api.  oxygen and xml spy allow you to
    set parameters via the xslt configuration.
  -->  
  
  <!--
    include the file metadata header that shows stix version, filename, and html generation timestamp
  -->  
  <xsl:param name="includeFileMetadataHeader" select="true()"/>
  
  <!--
    include the stix header - - the header table that shows the title, package
    intent, description, handling, information source, etc.
  -->
  <xsl:param name="includeStixHeader" select="true()"/>
  
  <!--
    set to true if you want to preserve line breaks in the description text,
    fields, otherwise text descriptions will be flowed like normal html text
  -->
  <xsl:param name="enablePreformattedDescriptions" select="false()" />

  <!--<commit_msg>Fixed minor issue with -- being in a comment<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (c) 2013 – The MITRE Corporation
  All rights reserved. See LICENSE.txt for complete terms.
 -->
<!--
STIX XML to HTML transform v1.0
Compatible with CybOX v2.0

This is an xslt to transform a STIX 2.0 document into html for easy viewing.  
CybOX observables, Indicators & TTPs are supported and turned into collapsible 
HTML elements.  Details about structure's contents are displayed in a
format representing the nested nature of the original document.

Objects which are referred to by reference can be expanded within the context
of the parent object, unless the reference points to an external document

This is a work in progress.  Feedback is most welcome!

requirements:
 - XSLT 2.0 engine (this has been tested with Saxon 9.5)
 - a STIX 2.0 input xml document
 
Created 2013
<EMAIL>
<EMAIL>
  
-->

<xsl:stylesheet version="2.0"
  xmlns:stix="http://stix.mitre.org/stix-1"
  xmlns:cybox="http://cybox.mitre.org/cybox-2"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:fn="http://www.w3.org/2005/xpath-functions"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:indicator="http://stix.mitre.org/Indicator-2"
  xmlns:TTP="http://stix.mitre.org/TTP-1"
  xmlns:COA="http://stix.mitre.org/CourseOfAction-1"
  xmlns:capec="http://stix.mitre.org/extensions/AP#CAPEC2.5-1"
  xmlns:marking="http://data-marking.mitre.org/Marking-1"
  xmlns:tlpMarking="http://data-marking.mitre.org/extensions/MarkingStructure#TLP-1"
  xmlns:stixVocabs="http://stix.mitre.org/default_vocabularies-1"
  xmlns:cyboxCommon="http://cybox.mitre.org/common-2"
  xmlns:cyboxVocabs="http://cybox.mitre.org/default_vocabularies-2"
  xmlns:stixCommon="http://stix.mitre.org/common-1"
  xmlns:EmailMessageObj="http://cybox.mitre.org/objects#EmailMessageObject-2"
  exclude-result-prefixes="cybox xsi fn EmailMessageObj">

  <xsl:output method="html" omit-xml-declaration="yes" indent="yes" media-type="text/html"
    version="4.0"/>
  
  <!--
    how to set parameters: xslt stylesheet parameters should be passed in via
    whatever mechanism the xslt engine has.  saxon allows you to set parameters
    via the command-line or via the java api.  oxygen and xml spy allow you to
    set parameters via the xslt configuration.
  -->  
  
  <!--
    include the file metadata header that shows stix version, filename, and html generation timestamp
  -->  
  <xsl:param name="includeFileMetadataHeader" select="true()"/>
  
  <!--
    include the stix header - the header table that shows the title, package
    intent, description, handling, information source, etc.
  -->
  <xsl:param name="includeStixHeader" select="true()"/>
  
  <!--
    set to true if you want to preserve line breaks in the description text,
    fields, otherwise text descriptions will be flowed like normal html text
  -->
  <xsl:param name="enablePreformattedDescriptions" select="false()" />

  <!--
{'fraction_non_alphanumeric': 0.1253518794502401, 'fraction_numerical': 0.020533200861069714, 'mean_word_length': 3.9793899422918386, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 2, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 42}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6226772', 'n_tokens_mistral': 2078, 'n_tokens_neox': 1979, 'n_words': 543}