AnsweredAssumed Answered

Problems importing from XSL

Question asked by DaveReuss on Dec 6, 2011

Title

Problems importing from XSL

Post

 Just got a XSL file from a helpful person, but I;m stuck again. I'm trying to pull data from a rather complex XML file that's created to be viewed as a web page. I replaced the XSL file with the new one, but i still have problems.

Basically, the file imports so that I can see the field names, but there is no data in them and there's only one record.

 

Sample of XML File:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='STIG_fouo.xsl'?>
<Benchmark xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cpe="http://cpe.mitre.org/language/2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" id="Windows_7_STIG" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.1http://nvd.nist.gov/schema/xccdf-1.1.4.xsdhttp://cpe.mitre.org/dictionary/2.0http://cpe.mitre.org/files/cpe-dictionary_2.1.xsd" xmlns="http://checklists.nist.gov/xccdf/1.1">
 <status date="2011-09-30">accepted</status>
 <title>Windows 7 Security Technical Implementation Guide</title>
 <description>The Windows 7 Security Technical Implementation Guide (STIG) is published as a tool to improve the security of Department of Defense (DoD) information systems.  The requirements were developed from DoD consensus, as well as the Windows 7 Security Guide and security templates published by Microsoft Corporation.  Comments or proposed revisions to this document should be sent via e-mail to the following address:  fso_spt@disa.mil.  </description>
 <notice id="terms-of-use" xml:lang="en">Developed_by_DISA_for_the_DoD</notice>
 <reference href="http://iase.disa.mil">
  <dc:publisher>DISA, Field Security Operations</dc:publisher>
  <dc:source>STIG.DOD.MIL</dc:source>
 </reference>
 <plain-text id="release-info">Release: 6 Benchmark Date: 28 Oct 2011</plain-text>
 <version>1</version>
 <Profile id="MAC-1_Public">
  <title>I - Mission Critical Public</title>
  <description>&lt;ProfileDescription&gt;&lt;/ProfileDescription&gt;</description>
  <select idref="V-1070" selected="true"/>
  <select idref="V-1072" selected="true"/>

 

THEN A LOT OF THESE (1 for each record)...


  <select idref="V-30361" selected="true"/>
  <select idref="V-30362" selected="true"/>


the the data starts here...


 </Profile>
 <Group id="V-1070">
  <title>Title Here</title>
  <description>Description here</description>
  <Rule id="SV-24996r1_rule" severity="medium" weight="10.0">
   <version>1.001</version>
   <title>Title Here</title>
   <description>Description Here</description>
   <fixtext fixref="F-31r1_fix">Fixtext here.</fixtext>
   <fix id="F-31r1_fix"/>
   <check system="C-7883r4_chk">
    <check-content-ref name="M" href="VMS_XCCDF_Benchmark_Windows_7_STIG.xml"/>
    <check-content>Check text here.</check-content>
   </check>
  </Rule>
 </Group>
 <Group id="V-1072">
  <title>Title Here</title>
  <description>Description here</description>
  <Rule id="SV-25000r1_rule" severity="medium" weight="10.0">
   <version>1.008</version>
   <title>Title Here</description>
   <fixtext fixref="F-33r1_fix">Fixtext here.</fixtext>
   <fix id="F-33r1_fix"/>
   <check system="C-7885r4_chk">
    <check-content-ref name="M" href="VMS_XCCDF_Benchmark_Windows_7_STIG.xml"/>
    <check-content>Check text here.</check-content>
   </check>
  </Rule>
 </Group>
</Benchmark>

 XSL File:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>

<xsl:template match="/">

<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
<ERRORCODE>0</ERRORCODE>
<PRODUCT BUILD="" NAME="" VERSION=""/>
<DATABASE DATEFORMAT="" LAYOUT="" NAME="" RECORDS="" TIMEFORMAT=""/>

<METADATA>
<FIELD NAME="GroupID" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
<FIELD NAME="GroupTitle" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
<FIELD NAME="RuleID" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
<FIELD NAME="RuleSeverity" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
<FIELD NAME="RuleTitle" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
<FIELD NAME="Description" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
<FIELD NAME="fixtext" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
<FIELD NAME="check-content" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
</METADATA>


<RESULTSET FOUND="">

<ROW MODID="" RECORDID="">
<COL><DATA><xsl:value-of select="Group/@id"/></DATA></COL>
<COL><DATA><xsl:value-of select="Group/title"/></DATA></COL>
<COL><DATA><xsl:value-of select="Group/Rule/@id"/></DATA></COL>
<COL><DATA><xsl:value-of select="Group/Rule/@severity"/></DATA></COL>
<COL><DATA><xsl:value-of select="Group/Rule/title"/></DATA></COL>
<COL><DATA><xsl:value-of select="Group/Rule/description"/></DATA></COL>
<COL><DATA><xsl:value-of select="Group/Rule/fixtext"/></DATA></COL>
<COL><DATA><xsl:value-of select="Group/Rule/check-content"/></DATA></COL>
</ROW>

</RESULTSET>
</FMPXMLRESULT>

</xsl:template>
</xsl:stylesheet>

Any help would be greatly appreciated!

Outcomes