This commit is contained in:
ninja
2025-12-15 22:06:49 +08:00
commit 2b56cf87a8
225 changed files with 63711 additions and 0 deletions

View File

@@ -0,0 +1,353 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" version="4.0"/>
<xsl:template match="Root">
<html>
<head>
<script type="text/javascript">
<xsl:text>
function showHide(obj){
var tbody = obj.parentNode.parentNode.parentNode.getElementsByTagName("tbody")[0];
var old = tbody.style.display;
tbody.style.display = (old == "none"?"":"none");
}
</xsl:text>
</script>
<style type="text/css">
th{
text-align: left;
cursor: pointer;
}
table tbody tr td{
padding-left: 5px;
padding-right: 5px;
border-collapse: collapse;
}
table {
border-top: 3px solid grey;
border-collapse: collapse;
}
</style>
</head>
<body>
<xsl:apply-templates select="CONTAINER"/>
</body>
</html>
</xsl:template>
<xsl:template match="CONTAINER|CONTAINER_INTERNAL">
<xsl:apply-templates select="NODE"/>
</xsl:template>
<xsl:template match="TYPE">
<tr>
<th><xsl:value-of select="FEATURE/@Type_type" /></th>
<td colspan = "3">
<xsl:value-of select="FEATURE/@Value" />
</td>
</tr>
</xsl:template>
<xsl:template match="NODE">
<p>
<table BORDER = "2">
<xsl:for-each select="RootBaseData">
<thead>
<tr bgcolor="#93B6CD" style="color: white;">
<th colspan = "4" onclick="showHide(this)" ><xsl:value-of select="@m_pcName" /></th>
</tr>
</thead>
</xsl:for-each>
<tbody style="display:none">
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="DATA"/>
<xsl:for-each select="SPECIFICATION/FeatureMode">
<tr>
<th>Feature mode</th>
<td>
<xsl:value-of select="@Value" />
</td>
</tr>
</xsl:for-each>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="FEATURE_DEFINITION"/>
<xsl:if test = "CONTAINER">
<tr>
<th>CONTAINER</th>
<td style="padding: 0px 0px 0px 0px;margin: 0px 0 0 0;">
<table BORDER = "1" width="100%">
<xsl:apply-templates select="CONTAINER"/>
</table>
</td>
</tr>
</xsl:if>
<xsl:if test = "CONTAINER_INTERNAL">
<p style="padding: 0px 0px 0px 0px;margin: 0px 0 0 0;">
<tr>
<th>CONTAINER_INTERNAL</th>
<td >
<table BORDER = "1" width="100%">
<xsl:apply-templates select="CONTAINER_INTERNAL"/>
</table>
</td>
</tr>
</p>
</xsl:if>
</tbody>
</table>
</p>
</xsl:template>
<xsl:template match="FEATURE_DEFINITION">
<xsl:for-each select="FEATURE">
<tr bgcolor="#CEE3F6">
<th colspan = "4" ><xsl:value-of select="@feature_definition_type" /></th>
</tr>
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="DEFINITION"/>
<xsl:apply-templates select="DATA"/>
</xsl:for-each>
</xsl:template>
<xsl:template name="data_text">
<xsl:param name="text" />
<xsl:choose>
<xsl:when test="contains($text,',,')">
<xsl:value-of select= "substring-before($text,',,')"/>
<BR/>
<xsl:call-template name="data_text"><xsl:with-param name="text" select="substring-after($text,',,')" /></xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="$text" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="DATA">
<xsl:for-each select="FEATURE">
<xsl:choose>
<xsl:when test="@data_type='value'">
<tr>
<th><xsl:value-of select = "@value_type"/></th>
<!--xsl:apply-templates select="DATA"/-->
<xsl:choose>
<xsl:when test="DATA/FEATURE/@data_type='double'">
<td colspan = "3"> <xsl:call-template name="data_text"><xsl:with-param name="text" select="DATA/FEATURE/@data" /></xsl:call-template></td>
</xsl:when>
<xsl:otherwise>
<td colspan = "3"><xsl:value-of select = "DATA/FEATURE/@data"/></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:when>
<xsl:when test="@data_type='double'">
<tr>
<xsl:if test = "@double_type != 'unknown'">
<th><xsl:value-of select = "@double_type"/></th>
</xsl:if>
<td colspan = "3"> <xsl:call-template name="data_text"><xsl:with-param name="text" select="@data" /></xsl:call-template></td>
</tr>
</xsl:when>
<xsl:when test="@data_type='integer'">
<tr>
<xsl:if test = "@integer_type != 'unknown'">
<th><xsl:value-of select = "@integer_type"/></th>
</xsl:if>
<xsl:if test = "@integer_type != 'boolean'">
<td colspan = "3"> <xsl:call-template name="data_text"><xsl:with-param name="text" select="@data" /></xsl:call-template></td>
</xsl:if>
<xsl:if test = "@integer_type = 'boolean'">
<xsl:if test = "@data = '0'">
<td colspan = "3"> FALSE</td>
</xsl:if>
<xsl:if test = "@data = '1'">
<td colspan = "3"> TRUE</td>
</xsl:if>
</xsl:if>
</tr>
</xsl:when>
<xsl:when test="@data_type='string'">
<xsl:choose>
<xsl:when test="@string_type='unknown'">
<tr><td colspan = "3"><xsl:value-of select = "@data"/></td></tr>
</xsl:when>
<xsl:when test="@string_type='attribute'">
<tr>
<td><xsl:value-of select= "substring-before(@data,' xts3dx ')"/></td>
<td colspan = "2"><xsl:value-of select= "substring-after(@data,' xts3dx ')"/></td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr><th><xsl:value-of select = "@string_type"/></th></tr>
<tr><td colspan = "3"><xsl:value-of select = "@data"/></td></tr>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:template match="DEFINITION">
<xsl:for-each select="FEATURE">
<xsl:choose>
<xsl:when test="@data_type='definition'">
<tr>
<th colspan = "4" bgcolor="#E6E6E6" ><xsl:value-of select = "@definition_type"/></th>
<!-- <xsl:apply-templates select="Connection/DrawingBlock"/> -->
</tr>
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="DATA"/>
<xsl:apply-templates select="DEFINITION"/>
</xsl:when>
<xsl:when test="@data_type='definition_pattern'">
<xsl:choose>
<xsl:when test="@definition_pattern_type='InstanceStatus'">
<tr >
<th>instance status</th><td colspan="3"><xsl:value-of select = ".//@data"/></td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr style="padding: 0px 0px 0px 0px; border-collapse: collapse; border-spacing: 0px 0px 0px 0px;">
<td colspan = "4" style="padding: 0px 0px 0px 0px; border-collapse: collapse; ">
<table BORDER = "1" width="100%" >
<thead>
<tr >
<th colspan = "4" onclick="showHide(this)" bgcolor="#EFF5FB" ><xsl:value-of select = "@definition_pattern_type"/></th>
</tr>
</thead>
<tbody style="display:none">
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="DATA"/>
<xsl:apply-templates select="DEFINITION"/>
</tbody>
</table>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@data_type='definition_hole'">
<tr >
<td style="padding: 0px 0px 0px 0px;border-spacing: 0px;" colspan = "4">
<table BORDER = "1" width="100%">
<th colspan = "4" onclick="showHide(this)" bgcolor="#EFF5FB" ><xsl:value-of select = "@definition_hole_type"/></th>
<tbody style="display:none">
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="DATA"/>
<xsl:apply-templates select="DEFINITION"/>
</tbody>
</table>
</td>
</tr>
</xsl:when>
<xsl:when test="@data_type='definition_thread'">
<tr >
<td style="padding: 0px 0px 0px 0px;border-spacing: 0px;" colspan = "4">
<table BORDER = "1" width="100%">
<th colspan = "4" onclick="showHide(this)" bgcolor="#EFF5FB" ><xsl:value-of select = "@definition_thread_type"/></th>
<tbody style="display:none">
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="DATA"/>
<xsl:apply-templates select="DEFINITION"/>
</tbody>
</table>
</td>
</tr>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<!-- connection -->
<xsl:template match="Connection">
<tr bgcolor="#F5F6CE">
<th >Link</th>
<td> <xsl:value-of select= "@Type"/></td>
<xsl:apply-templates select="RootBaseData"/>
<xsl:apply-templates select="DrawingBlock/RootBaseData"/>
<xsl:apply-templates select="ReferenceOnTopology"/>
<xsl:apply-templates select="A3DFRMFeatureLinkedItemConnector"/>
</tr>
</xsl:template>
<xsl:template match="A3DFRMFeatureLinkedItemConnector">
<td>
error
</td>
<td>
<xsl:value-of select= "@error"/>
</td>
</xsl:template>
<xsl:template match="DrawingBlock">
<td colspan = "2">DrawingBlock</td>
<!--tr >
<th colspan = "2">Entities</th>
</tr>
<tr>
<td>count</td>
<td>
<xsl:value-of select= "@Entity_count"/>
</td>
</tr>
<tr>
<td>markup_count</td>
<td>
<xsl:value-of select= "@Markup_count"/>
</td>
</tr>
<tr>
<td>subblock_count</td>
<td>
<xsl:value-of select= "@SubBlock_count"/>
</td-->
</xsl:template>
<xsl:template match="ReferenceOnTopology">
<td>
<xsl:value-of select= "@topotype"/>
</td>
<td>
<xsl:value-of select= "face_indexes/@indexes"/>
</td>
</xsl:template>
<xsl:template match="RootBaseData">
<xsl:if test = "@m_pcName">
<td>
<xsl:value-of select= "@m_pcName"/>
</td>
<td>
<xsl:value-of select= "@m_uiPersistentId"/>
</td>
</xsl:if>
<xsl:if test = "Connection/DrawingBlock">
<td>
<xsl:value-of select= "Connection/DrawingBlock/RootBaseData/@m_pcName"/>
</td>
<td>
<xsl:value-of select= "Connection/DrawingBlock/RootBaseData/@m_uiPersistentId"/>
</td>
</xsl:if>
</xsl:template>
</xsl:stylesheet>