Subject: xslt(test1.xsl) does not go below root(of system-characteristics.xml)
command line: java -jar SaxonHE9-7-0-1J\saxon9he.jar -o:oval-output.xml system-characteristics.xml -xsl:test1.xsl
Output:===== oval-output.xml =======
<?xml version="1.0" encoding="UTF-8"?> help (oval_system_characteristics)
========== system-characteristics.xml =============
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <oval_system_characteristics xmlns="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:win-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5 oval-system-characteristics-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd"> <generator> <oval:product_name>cpe:/a:mitre:ovaldi:5.10.1.7</oval:product_name> <oval:product_version>5.10.1 Build: 7</oval:product_version> <oval:schema_version>5.10.1</oval:schema_version> <oval:timestamp>2016-01-16T19:34:09</oval:timestamp> <vendor xmlns="">The MITRE Corporation</vendor> </generator> </oval_system_characteristics>
================== test1.xsl =======
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:win-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5 oval-system-characteristics-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd" version="2.0" > <xsl:output method="xml"/> <xsl:template match="/"> <xsl:text> help </xsl:text> <xsl:text>(</xsl:text> <xsl:value-of select="name(*)"/> <xsl:text>)</xsl:text> <xsl:apply-templates select="generator"/> </xsl:template> <xsl:template match="generator"> <xsl:text> help </xsl:text> <xsl:text>(</xsl:text> <xsl:value-of select="name(*)"/> <xsl:text>)</xsl:text> </xsl:template> </xsl:stylesheet>
No comments:
Post a Comment