-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switched to having the icon templates use a shared function
also now the switch between iconReferenceStyle == "inlineLiteralXml" and iconReferenceStyle == "dataUri" is now working * data urs with base64 encoded svg data are now usable * inlineLiteralXml is the default change also allows the stylesheet parameter to be passed in to the main stylesheet (stix-to-html.xsl) and used in the (now imported) icons.xsl this supports issue #23
- Loading branch information
Showing
2 changed files
with
49 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,9 +48,12 @@ [email protected] | |
xmlns:EmailMessageObj="http://cybox.mitre.org/objects#EmailMessageObject-2" | ||
exclude-result-prefixes="cybox xsi fn EmailMessageObj"> | ||
|
||
<xsl:import href="icons.xsl"/> | ||
|
||
<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 | ||
|
@@ -82,17 +85,19 @@ [email protected] | |
* relativeUri - normal html image style references, e.g. <img src="images/logo.svg" /> | ||
--> | ||
<xsl:param name="iconReferenceStyle" select="'inlineLiteralXml'" /> | ||
|
||
<!-- | ||
do you want to display the constraints in cyboxProperties-style displays? | ||
usually the answer is true(), but if you want a more concise display, set to false(). | ||
--> | ||
<xsl:param name="displayConstraints" select="true()"/> | ||
|
||
<xsl:include href="stix_common.xsl"/> | ||
<xsl:include href="icons.xsl"/> | ||
<xsl:include href="normalize.xsl"/> | ||
|
||
<!-- do not modify this, this is used inside icons.xsl to pass in the value of the iconReferenceStyle parameter --> | ||
<xsl:variable name="iconReferenceStyleVariable" select="$iconReferenceStyle" /> | ||
|
||
<xsl:variable name="isRootStix" select="fn:exists(/stix:STIX_Package)" /> | ||
<xsl:variable name="isRootCybox" select="fn:exists(/cybox:Observables)" /> | ||
|
||
|