问题描述
你好,
我是这个论坛的新手而不是真正的开发者。所以我遇到了Visual Studio 2010和xsl的问题,我希望能帮到你。
$
我正在使用Visual Studio 2010并尝试调试一个xsl文件。
调试器在一行中显示错误,我尝试将变量转换为节点集
< xsl: variable name =" smcCollectedObjectsNodeset" select =" xalan:nodeset($ smcCollectedObjects)" />
$
这里调试器因XslTransformException而停止"无法找到实现前缀的脚本或外部对象'$
http://xml.apache.org/xalan'
我在xml文件的标题中定义了xalan名称空间为你可以在文中看到。
< xsl:stylesheet version =" 1.0"的xmlns:XSL = QUOT; kttp://www.w3.org/1999/XSL/Transform" xmlnslm = QUOT; HTTP://www.plmxml.org/Schemas/PLMXMLSchema"的xmlns:的Xalan = QUOT; HTTP://xml.apache.org/xalan"的xmlns:lxslt = QUOT; HTTP://www.apache.org/xslt" xmlns:redirect =" org.apache.xalan.lib.Redirect">
< xsl:variable name =" reportHeader" select ="'Mengenstueckliste fuer Maschinenteile(M)'> /
有人知道如何使用Visual Studio 2010解决此问题吗?
您可以在下面找到xsl和xml文件的内容。
<?xml version =" 1.0"?>
< xsl:stylesheet version =" 1.0"的xmlns:XSL = QUOT; HTTP://www.w3.org/1999/XSL/Transform"的xmlns:PLM = QUOT; HTTP://www.plmxml.org/Schemas/PLMXMLSchema"的xmlns:的Xalan = QUOT; HTTP://xml.apache.org/xalan"的xmlns:lxslt = QUOT; HTTP://www.apache.org/xslt"的xmlns:重定向= QUOT; org.apache.xalan.lib.Redirect">
< xsl:variable name =" reportHeader" select ="'Mengenstueckliste fuer Maschinenteile(M)'"
< xsl:key name =" smcProductRevisionKey"匹配= QUOT; PLM:ProductRevision"使用= QUOT; @ ID" />
< xsl:key name =" smcProductKey"匹配= QUOT; PLM:产品与QUOT;使用= QUOT; @ ID" />
< xsl:key name =" smcAssociatedAttachmentKey"匹配= QUOT; PLM:AssociatedAttachment"使用= QUOT; @ ID" />
< xsl:key name =" smcFormKey"匹配= QUOT; PLM:形式"使用= QUOT; @ ID" />
< xsl:output method =" html" />
< xsl:template match =" /">
< html>
< head>
< title>
< xsl:value-of select =" $ reportHeader" />
< / title>
< style type =" text / css">
table
{
border-collapse:collapse;
border-spacing:0pt;
宽度:100%;
empty-cells:show;
<! - Farbe des Zellrahmens - >
border-color:#000000;
}
th
{
border-style:solid;
border-width:0.2pt;
border-color:#000000;
background-color:#99CCFF;
font-family:Arial;
}
td
{
border-style:solid;
border-width:0.2pt;
border-color:#000000;
font-family:Arial;
颜色:#000000;
}
< / style>
< / head>
< body bgcolor =" FFFFFF"链接= QUOT;#0000FF"的Vlink = QUOT;#660066">
< br />
< p>
< table width =" 100%">
< tr bgcolor =" #FFCC66">
< td>
< font size =" 4">
< xsl:value-of select =" $ reportHeader" />
< / font>
< / td>
< / tr>
< / table>
< / p>
< xsl:variable name =" smcCollectedObjects">
< smcItemRevisions>
< xsl:for-each select =" // plm:ProductView / plm:Occurrence">
< xsl:variable name =" smcProductRevisionElement" select =" key('smcProductRevisionKey',substring-after(@instancedRef,'#'))" />
< xsl:variable name =" smcProductElementID"选择= QUOT;串 - 后($ smcProductRevisionElement / @ masterRef,"#")" />
< xsl:variable name =" smcProductElement" select =" key('smcProductKey',$ smcProductElementID)" />
< xsl:call-template name =" loopAssociatedReferences">
< xsl:with-param name =" associatedReferences"选择= QUOT; @ associatedAttachmentRefs" />
< xsl:with-param name =" itemRevName"选择= QUOT; $ smcProductRevisionElement / @名称" />
< xsl:with-param name =" itemRevID"选择= QUOT; $ smcProductRevisionElement / @修订" />
< xsl:with-param name =" itemRevItemID"选择= QUOT; $ smcProductElement / @的productId" />
< / xsl:call-template>
< / xsl:for-each>
< / smcItemRevisions>
< / xsl:variable>
< xsl:variable name =" smcCollectedObjectsNodeset"选择= QUOT; Xalan的:节点集($ smcCollectedObjects)QUOT; />
< table>
< tr align =" left">
< th>名称< / th>
< th> Artikelnummer< / th>
< th>版本< / th>
< th> Anzahl< / th>
< / tr>
< / table>
< / body>
< / html>
< / xsl:template>
<! - ***************************************** ********************************* - >
< xsl:template name =" loopAssociatedReferences">
<! - ***************************************** ********************************* - >
< xsl:param name =" associatedReferences" />
< xsl:param name =" itemRevName" />
< xsl:param name =" itemRevID" />
< xsl:param name =" itemRevItemID" />
< xsl:if test =" $ associatedReferences!=''">
< xsl:choose>
<! - 检查associatedReferences是否包含多个条目 - >
<! - 如果是,那么继续 - >
< xsl:when test =" contains($ associatedReferences,'')">
<! - - >
< xsl:call-template name =" xxx">
< xsl:with-param name =" associatedRefID" select =" substring-before($ associatedReferences,'')" />
< xsl:with-param name =" itemRevName"选择= QUOT; $ itemRevName" />
< xsl:with-param name =" itemRevID"选择= QUOT; $ itemRevID" />
< xsl:with-param name =" itemRevItemID"选择= QUOT; $ itemRevItemID" />
< / xsl:call-template>
<! - 使用已调整的关联参数调整此模板 - >
< xsl:call-template name =" loopAssociatedReferences">
< xsl:with-param name =" associatedReferences" select =" substring-after($ associatedReferences,'')" />
< xsl:with-param name =" itemRevName"选择= QUOT; $ itemRevName" />
< xsl:with-param name =" itemRevID"选择= QUOT; $ itemRevID" />
< xsl:with-param name =" itemRevItemID"选择= QUOT; $ itemRevItemID" />
< / xsl:call-template>
< / xsl:when>
<! - associatedReferences中只有一个条目 - >
< xsl:otherwise>
< xsl:call-template name =" xxx">
< xsl:with-param name =" associatedRefID"选择= QUOT; $ associatedReferences" />
< xsl:with-param name =" itemRevName"选择= QUOT; $ itemRevName" />
< xsl:with-param name =" itemRevID"选择= QUOT; $ itemRevID" />
< xsl:with-param name =" itemRevItemID"选择= QUOT; $ itemRevItemID" />
< / xsl:call-template>
< / xsl:否则>
< / xsl:choose>
< / xsl:if>
< / xsl:template>
<! - ***************************************** ********************************* - >
< xsl:template name =" xxx">
<! - ***************************************** ********************************* - >
< xsl:param name =" associatedRefID" />
< xsl:param name =" itemRevName" />
< xsl:param name =" itemRevID" />
< xsl:param name =" itemRevItemID" />
< xsl:variable name =" associatedAttachmentElement" select =" key('smcAssociatedAttachmentKey',substring-after($ associatedRefID,'#'))" />
< xsl:if test =" $ associatedAttachmentElement / @ role ='IMAN_master_form'">
< xsl:variable name =" formID"选择= QUOT;串 - 后($ associatedAttachmentElement / @ attachmentRef,"#")" />
< xsl:variable name =" formElement" select =" key('smcFormKey',$ formID)" />
< xsl:variable name =" smcClassGroup"选择= QUOT; $ formElement / PLM:的UserData / PLM:UserValue [@标题=" SmcClassGroup"] / @值QUOT; />
< xsl:if test =" $ smcClassGroup ='X'或$ smcClassGroup ='M'">
< vpdgItemRev>
< vpdgItemRevName>
< xsl:value-of select =" $ itemRevName" />
< / vpdgItemRevName>
< vpdgItemRevItemID>
< xsl:value-of select =" $ itemRevItemID" />
< / vpdgItemRevItemID>
< vpdgItemRevID>
< xsl:value-of select =" $ itemRevID" />
< / vpdgItemRevID>
<! - - >
< testGroup>
< xsl:value-of select =" $ formElement / plm:UserData / plm:UserValue [@ title ='SmcClassGroup'] / @ value" />
< / testGroup>
< / vpdgItemRev>
< / xsl:if>
< / xsl:if>
< / xsl:template>
< / xsl:stylesheet>
<?xml version =" 1.0"编码= QUOT; UTF-8英寸;?>
<! - 生成者:PLM XML SDK 7.0.2.173 - >
< PLMXML xmlns =" http://www.plmxml.org/Schemas/PLMXMLSchema"
schemaVersion =" 6"语言=" EN-US"日期= QUOT; 2012-04-04"时间= QUOT; 12:54:23" author =" Teamcenter V8000.3.0.21_20110408.00 - infodba @ IMC-528199808(528199808)">
< Header id =" id1" traverseRootRefs = QUOT;#ID6" transferContext = QUOT; ConfiguredDataExportDefault" />
< ProductRevision id =" id33" name =" Testpart Klotz" accessRefs = QUOT;#ID10" subType =" smc Revision" masterRef = QUOT;#id37"修订= QUOT; B">
< UserData id =" id34">
< UserValue value =" 2011-09-15T13:38:47"标题= QUOT; last_mod_date" />
< UserValue value =" 10002598 / B-Testpart Klotz"标题= QUOT; object_string" />
< / UserData>
< AssociatedDataSet id =" id35" dataSetRef = QUOT;#ID27"角色= QUOT; IMAN_specification" />
< AssociatedDataSet id =" id36" dataSetRef = QUOT;#ID24"角色= QUOT; IMAN_Rendering" />
< / ProductRevision>
< ProductRevision id =" id59"名称= QUOT; Screw_DIN_912_M12x110" accessRefs = QUOT;#ID10" subType =" smc Revision" masterRef = QUOT;#id63"修订= QUOT; A">
< UserData id =" id60">
< UserValue value =" 2011-09-27T15:11:03"标题= QUOT; last_mod_date" />
< UserValue value =" 10002600 / A-Screw_DIN_912_M12x110"标题= QUOT; object_string" />
< / UserData>
< AssociatedDataSet id =" id61" dataSetRef = QUOT;#id53"角色= QUOT; IMAN_specification" />
< AssociatedDataSet id =" id62" dataSetRef = QUOT;#ID50"角色= QUOT; IMAN_Rendering" />
< / ProductRevision>
< ProductRevision id =" id68" name =" Testassembly Klotz" accessRefs = QUOT;#ID10" subType =" smc Revision" masterRef = QUOT;#id71"修订= QUOT; d">
< UserData id =" id69">
< UserValue value =" 2011-09-12T09:49:42"标题= QUOT; last_mod_date" />
< UserValue value =" 10002599 / D-Testassembly Klotz"标题= QUOT; object_string" />
< / UserData>
< AssociatedDataSet id =" id70" dataSetRef = QUOT;#ID9"角色= QUOT; IMAN_specification" />
< / ProductRevision>
< Product id =" id37" name =" Testpart Klotz" accessRefs = QUOT;#ID10"子类型= QUOT; SMC"的productId = QUOT; 10002598" />
< Product id =" id63"名称= QUOT; Screw_DIN_912_M12x110" accessRefs = QUOT;#ID10"子类型= QUOT; SMC"的productId = QUOT; 10002600" />
< Product id =" id71" name =" Testassembly Klotz" accessRefs = QUOT;#ID10"子类型= QUOT; SMC"的productId = QUOT; 10002599" />
< ProductDef id =" id38">
< InstanceGraph id =" id39">
< UserData id =" id40" type =" TC Specific Properties">
< UserValue value =" precise"标题= QUOT; BOM_precision_type" />
< / UserData>
< ProductInstance id =" id41" partRef = QUOT;#&ID42 QUOT; transformRef = QUOT; id43"的sequenceNumber = QUOT; 10"量= QUOT 1 QUOT;>
< ApplicationRef version =" QrMAAkR0xf7CIA"应用= QUOT; Teamcenter的"标签= QUOT; D0EAAQBvxf7CIA" />
< UserData id =" id44"类型= QUOT; InstanceNotes">
< UserValue value =" 10002598.par:1"标题= QUOT; AIE_OCC_NAME" />
< UserValue value =" Occ Id327" title =" SE ObjectID" />
< / UserData>
< Transform id =" id43"> 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1< / Transform>
< / ProductInstance>
< ProductInstance id =" id64" partRef = QUOT;#id65" transformRef = QUOT; id66"的sequenceNumber = QUOT; 20"量= QUOT 1 QUOT;>
< ApplicationRef version =" QvBAAkR0xf7CIA"应用= QUOT; Teamcenter的"标签= QUOT; D0KAAQBvxf7CIA" />
< UserData id =" id67"类型= QUOT; InstanceNotes">
< UserValue value =" Screw_DIN_912_M12x110_v9.00.par:1"标题= QUOT; AIE_OCC_NAME" />
< UserValue value =" Occ Id352" title =" SE ObjectID" />
< / UserData>
< Transform id =" id66"> 0 0 -1 0 1 0 0 0 0 -1 0 0 0.0256679460279 0.008500000000000001 -0.029499023116 1< / Transform>
< / ProductInstance>
< ProductRevisionView id =" id42" accessRefs = QUOT;#ID10" revisionRef = QUOT;#ID33">
< ApplicationRef version =" D0EAAQBvxf7CIA"应用= QUOT; Teamcenter的"标签= QUOT; ieCAAQBvxf7CIA / D0EAAQBvxf7CIA /" />
< / ProductRevisionView>
< ProductRevisionView id =" id65" accessRefs = QUOT;#ID10" revisionRef = QUOT;#id59">
< ApplicationRef version =" D0KAAQBvxf7CIA"应用= QUOT; Teamcenter的"标签= QUOT; DYBAAQBvxf7CIA / D0KAAQBvxf7CIA /" />
< / ProductRevisionView>
< / InstanceGraph>
< / ProductDef>
< RevisionRule id =" id2"命名= QUOT; 01_Load_as_saved">
< Description>最新工作其他最新任何状态< / Description>
< / RevisionRule>
< ProductView id =" id4" ruleRefs = QUOT;#ID2" rootRefs = QUOT; ID6" primaryOccurrenceRef = QUOT; ID6">
< UserData id =" id3" type =" TC Specific Properties">
< UserValue value =" precise"标题= QUOT; BOM_precision_type" />
< / UserData>
< AssociatedAttachment id =" id8" attachmentRef = QUOT;#ID9"角色= QUOT; IMAN_specification" />
< AssociatedAttachment id =" id16" attachmentRef = QUOT;#ID17"角色= QUOT; IMAN_master_form" />
< AssociatedAttachment id =" id23" attachmentRef = QUOT;#ID24"角色= QUOT; IMAN_Rendering" />
< AssociatedAttachment id =" id26" attachmentRef = QUOT;#ID27"角色= QUOT; IMAN_specification" />
< AssociatedAttachment id =" id30" attachmentRef = QUOT;#ID31"角色= QUOT; IMAN_master_form" />
< AssociatedAttachment id =" id49" attachmentRef = QUOT;#ID50"角色= QUOT; IMAN_Rendering" />
< AssociatedAttachment id =" id52" attachmentRef = QUOT;#id53"角色= QUOT; IMAN_specification" />
< AssociatedAttachment id =" id56" attachmentRef = QUOT;#id57"角色= QUOT; IMAN_master_form" />
< Occurrence id =" id6" instancedRef = QUOT;#id68" associatedAttachmentRefs ="#id8#id16" occurrenceRefs =" id20 id46">
< UserData id =" id7"类型= QUOT; AttributesInContext">
< UserValue value =""标题= QUOT; AO_ID" />
< UserValue value =""标题= QUOT;&的SequenceNumber QUOT; />
< UserValue value =""标题= QUOT; OccurrenceName" />
< UserValue value =""标题= QUOT;数量" />
< / UserData>
< Transform id =" id5"> 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1< / Transform>
< /出现>
< Occurrence id =" id20" instancedRef = QUOT;#ID33" instanceRefs = QUOT;#id41" associatedAttachmentRefs ="#id23#id26#id30" parentRef = QUOT;#ID6">
< UserData id =" id21"类型= QUOT; AttributesInContext">
< UserValue value =""标题= QUOT; AO_ID" />
< UserValue value =" 10"标题= QUOT;&的SequenceNumber QUOT; />
< UserValue value =""标题= QUOT; OccurrenceName" />
< UserValue value =" 1"标题= QUOT;数量" />
< / UserData>
< UserData id =" id22"类型= QUOT; InstanceNotes">
< UserValue value =" 10002598.par:1"标题= QUOT; AIE_OCC_NAME" />
< UserValue value =" Occ Id327" title =" SE ObjectID" />
< / UserData>
< Transform id =" id19"> 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1< / Transform>
< /出现>
< Occurrence id =" id46" instancedRef = QUOT;#id59" instanceRefs = QUOT;#id64" associatedAttachmentRefs ="#id49#id52#id56" parentRef = QUOT;#ID6">
< UserData id =" id47"类型= QUOT; AttributesInContext">
< UserValue value =""标题= QUOT; AO_ID" />
< UserValue value =" 20"标题= QUOT;&的SequenceNumber QUOT; />
< UserValue value =""标题= QUOT; OccurrenceName" />
< UserValue value =" 1"标题= QUOT;数量" />
< / UserData>
< UserData id =" id48"类型= QUOT; InstanceNotes">
< UserValue value =" Screw_DIN_912_M12x110_v9.00.par:1"标题= QUOT; AIE_OCC_NAME" />
< UserValue value =" Occ Id352" title =" SE ObjectID" />
< / UserData>
< Transform id =" id45"> 0 0 -1 0 1 0 0 0 0 -1 0 0 0.0256679460279 0.008500000000000001 -0.029499023116 1< / Transform>
< /出现>
< / ProductView>
< DataSet id =" id9"名称= QUOT; 10002599 / B" accessRefs = QUOT;#ID10"版本= QUOT 1 QUOT; memberRefs ="#id13#id14#id15" type =" SE Assembly" />
< AccessIntent id =" id10"意图= QUOT;参考" ownerRefs = QUOT;#ID11" />
< Site id =" id11"名称= QUOT; IMC-528199808"网站ID = QUOT; 528199808">
< UserData id =" id12">
< UserValue value =" 1"标题= QUOT; DBMS" />
< / UserData>
< /网站>
< ExternalFile id =" id13" accessRefs = QUOT;#ID10" locationRef = QUOT; 10002599.asm"格式= QUOT; ASM" />
< ExternalFile id =" id14" accessRefs = QUOT;#ID10" locationRef = QUOT; 10002599.cfg"格式= QUOT; CFG" />
< ExternalFile id =" id15" accessRefs = QUOT;#ID10" locationRef = QUOT; 10002599_asm.qaf"格式= QUOT; QAF" />
< Form id =" id17"名称= QUOT; 10002599 / d" accessRefs = QUOT;#ID10" subType =" smc Revision Master" subClass =" smc Revision Master">
< UserData id =" id18"类型= QUOT; FormAttributes">
< UserValue type =" int"值= QUOT 1 QUOT;标题= QUOT; assemblyType" />
< / UserData>
< / Form>
< DataSet id =" id24"名称= QUOT; 10002598 / B" accessRefs = QUOT;#ID10"版本= QUOT; 5英寸memberRefs = QUOT;#ID25"类型= QUOT; DirectModel">
<描述> SE部件的JT文件< / Description>
< / DataSet>
< ExternalFile id =" id25" accessRefs = QUOT;#ID10" locationRef = QUOT; 10002598.jt"格式= QUOT; JT" />
< DataSet id =" id27"名称= QUOT; 10002598 / B" accessRefs = QUOT;#ID10"版本= QUOT; 5英寸memberRefs ="#id28#id29" type =" SE Part" />
< ExternalFile id =" id28" accessRefs = QUOT;#ID10" locationRef = QUOT; 10002598.par"格式= QUOT;帕" />
< ExternalFile id =" id29" accessRefs = QUOT;#ID10" locationRef = QUOT; 10002598_par.qaf"格式= QUOT; QAF" />
< Form id =" id31"名称= QUOT; 10002598 / B" accessRefs = QUOT;#ID10" subType =" smc Revision Master" subClass =" smc Revision Master">
< UserData id =" id32"类型= QUOT; FormAttributes">
< UserValue type =" int"值= QUOT 1 QUOT;标题= QUOT; assemblyType" />
< / UserData>
< / Form>
< DataSet id =" id50"名称= QUOT; 10002600 / A" accessRefs = QUOT;#ID10"版本= QUOT; 3英寸memberRefs = QUOT;#ID51"类型= QUOT; DirectModel">
<描述> SE部件的JT文件< / Description>
< / DataSet>
< ExternalFile id =" id51" accessRefs = QUOT;#ID10" locationRef = QUOT; Screw_DIN_912_M12x110_v9.00.jt"格式= QUOT; JT" />
< DataSet id =" id53"名称= QUOT; 10002600 / A" accessRefs = QUOT;#ID10"版本= QUOT; 3英寸memberRefs ="#id54#id55" type =" SE Part" />
< ExternalFile id =" id54" accessRefs = QUOT;#ID10" locationRef = QUOT; Screw_DIN_912_M12x110_v9.00.par"格式= QUOT;帕" />
< ExternalFile id =" id55" accessRefs = QUOT;#ID10" locationRef = QUOT; Screw_DIN_912_M12x110_v9.00_par.qaf"格式= QUOT; QAF" />
< Form id =" id57"名称= QUOT; 10002600 / A" accessRefs = QUOT;#ID10" subType =" smc Revision Master" subClass =" smc Revision Master">
< UserData id =" id58"类型= QUOT; FormAttributes">
< UserValue type =" int"值= QUOT 1 QUOT;标题= QUOT; assemblyType" />
< / UserData>
< / Form>
< / PLMXML>
Hello,
I´m new to this forums and not realy a developer. So I have my problems with Visual Studio 2010 and xsl and I hope to find help with you.
I´m working with Visual Studio 2010 and try to debug an xsl file.
The debugger shows an error in a row where I try to convert an variable into a nodeset
<xsl:variable name="smcCollectedObjectsNodeset" select="xalan:nodeset($smcCollectedObjects)"/>
Here the debugger stops with XslTransformException "Cannot find the script or external object that implements prefix '
http://xml.apache.org/xalan'
I defined the xalan namespace in the header of the xml file as you can see in the text.
<xsl:stylesheet version="1.0" xmlns:xsl="kttp://www.w3.org/1999/XSL/Transform" xmlnslm="http://www.plmxml.org/Schemas/PLMXMLSchema" xmlns:xalan="http://xml.apache.org/xalan" xmlns:lxslt="http://www.apache.org/xslt" xmlns:redirect="org.apache.xalan.lib.Redirect">
<xsl:variable name="reportHeader" select="'Mengenstueckliste fuer Maschinenteile (M)'"/>
Does someone know how to solve this problem with visual Studio 2010?
Below you can find the content of the xsl and xml files.
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:plm="http://www.plmxml.org/Schemas/PLMXMLSchema" xmlns:xalan="http://xml.apache.org/xalan" xmlns:lxslt="http://www.apache.org/xslt" xmlns:redirect="org.apache.xalan.lib.Redirect"> <xsl:variable name="reportHeader" select="'Mengenstueckliste fuer Maschinenteile (M)'"/> <xsl:key name="smcProductRevisionKey" match="plm:ProductRevision" use="@id"/> <xsl:key name="smcProductKey" match="plm:Product" use="@id"/> <xsl:key name="smcAssociatedAttachmentKey" match="plm:AssociatedAttachment" use="@id"/> <xsl:key name="smcFormKey" match="plm:Form" use="@id"/> <xsl:output method="html" /> <xsl:template match="/"> <html> <head> <title> <xsl:value-of select="$reportHeader"/> </title> <style type="text/css"> table { border-collapse: collapse; border-spacing: 0pt; width: 100%; empty-cells: show; <!-- Farbe des Zellrahmens --> border-color:#000000; } th { border-style:solid; border-width:0.2pt; border-color: #000000; background-color: #99CCFF; font-family: Arial; } td { border-style:solid; border-width:0.2pt; border-color: #000000; font-family: Arial; color: #000000; } </style> </head> <body bgcolor="FFFFFF" link="#0000FF" vlink="#660066"> <br/> <p> <table width="100%"> <tr bgcolor="#FFCC66"> <td> <font size="4"> <xsl:value-of select="$reportHeader"/> </font> </td> </tr> </table> </p> <xsl:variable name="smcCollectedObjects"> <smcItemRevisions> <xsl:for-each select="//plm:ProductView/plm:Occurrence"> <xsl:variable name="smcProductRevisionElement" select="key('smcProductRevisionKey', substring-after(@instancedRef,'#'))"/> <xsl:variable name="smcProductElementID" select="substring-after($smcProductRevisionElement/@masterRef,'#')"/> <xsl:variable name="smcProductElement" select="key('smcProductKey', $smcProductElementID)" /> <xsl:call-template name="loopAssociatedReferences"> <xsl:with-param name="associatedReferences" select="@associatedAttachmentRefs"/> <xsl:with-param name="itemRevName" select="$smcProductRevisionElement/@name"/> <xsl:with-param name="itemRevID" select="$smcProductRevisionElement/@revision"/> <xsl:with-param name="itemRevItemID" select="$smcProductElement/@productId"/> </xsl:call-template> </xsl:for-each> </smcItemRevisions> </xsl:variable> <xsl:variable name="smcCollectedObjectsNodeset" select="xalan:nodeset($smcCollectedObjects)"/> <table> <tr align="left"> <th>Name</th> <th>Artikelnummer</th> <th>Revision</th> <th>Anzahl</th> </tr> </table> </body> </html> </xsl:template> <!-- ************************************************************************** --> <xsl:template name="loopAssociatedReferences"> <!-- ************************************************************************** --> <xsl:param name="associatedReferences"/> <xsl:param name="itemRevName"/> <xsl:param name="itemRevID"/> <xsl:param name="itemRevItemID"/>
<xsl:if test="$associatedReferences!=''"><xsl:choose><!-- Check if associatedReferences contains multiple entries --><!-- If yes, then go ahead --><xsl:when test="contains($associatedReferences,' ')"><!-- --><xsl:call-template name="xxx"><xsl:with-param name="associatedRefID" select="substring-before($associatedReferences,' ')"/> <xsl:with-param name="itemRevName" select="$itemRevName"/><xsl:with-param name="itemRevID" select="$itemRevID"/><xsl:with-param name="itemRevItemID" select="$itemRevItemID"/></xsl:call-template> <!-- Invoke this template with the adjusted arry of associatedReferences --><xsl:call-template name="loopAssociatedReferences"><xsl:with-param name="associatedReferences" select="substring-after($associatedReferences,' ')"/><xsl:with-param name="itemRevName" select="$itemRevName"/><xsl:with-param name="itemRevID" select="$itemRevID"/><xsl:with-param name="itemRevItemID" select="$itemRevItemID"/> </xsl:call-template></xsl:when><!-- There is just one entry in associatedReferences --><xsl:otherwise> <xsl:call-template name="xxx"><xsl:with-param name="associatedRefID" select="$associatedReferences"/><xsl:with-param name="itemRevName" select="$itemRevName"/><xsl:with-param name="itemRevID" select="$itemRevID"/><xsl:with-param name="itemRevItemID" select="$itemRevItemID"/> </xsl:call-template></xsl:otherwise></xsl:choose> </xsl:if></xsl:template><!-- ************************************************************************** --><xsl:template name="xxx"><!-- ************************************************************************** --><xsl:param name="associatedRefID"/><xsl:param name="itemRevName"/><xsl:param name="itemRevID"/><xsl:param name="itemRevItemID"/><xsl:variable name="associatedAttachmentElement" select="key('smcAssociatedAttachmentKey', substring-after($associatedRefID,'#'))"/><xsl:if test="$associatedAttachmentElement/@role ='IMAN_master_form'"><xsl:variable name="formID" select="substring-after($associatedAttachmentElement/@attachmentRef,'#')"/><xsl:variable name="formElement" select="key('smcFormKey', $formID)"/><xsl:variable name="smcClassGroup" select="$formElement/plm:UserData/plm:UserValue[@title='SmcClassGroup']/@value"/><xsl:if test="$smcClassGroup ='X' or $smcClassGroup ='M'"><vpdgItemRev><vpdgItemRevName><xsl:value-of select="$itemRevName"/></vpdgItemRevName><vpdgItemRevItemID><xsl:value-of select="$itemRevItemID"/></vpdgItemRevItemID><vpdgItemRevID><xsl:value-of select="$itemRevID"/></vpdgItemRevID><!-- --><testGroup><xsl:value-of select="$formElement/plm:UserData/plm:UserValue[@title='SmcClassGroup']/@value"/></testGroup></vpdgItemRev></xsl:if></xsl:if></xsl:template></xsl:stylesheet>
<?xml version="1.0" encoding="utf-8"?> <!-- GENERATED BY: PLM XML SDK 7.0.2.173 --> <PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema" schemaVersion="6" language="en-us" date="2012-04-04" time="12:54:23" author="Teamcenter V8000.3.0.21_20110408.00 - infodba@IMC-528199808(528199808)"> <Header id="id1" traverseRootRefs="#id6" transferContext="ConfiguredDataExportDefault"/> <ProductRevision id="id33" name="Testpart Klotz" accessRefs="#id10" subType="smc Revision" masterRef="#id37" revision="B"> <UserData id="id34"> <UserValue value="2011-09-15T13:38:47" title="last_mod_date"/> <UserValue value="10002598/B-Testpart Klotz" title="object_string"/> </UserData> <AssociatedDataSet id="id35" dataSetRef="#id27" role="IMAN_specification"/> <AssociatedDataSet id="id36" dataSetRef="#id24" role="IMAN_Rendering"/> </ProductRevision> <ProductRevision id="id59" name="Screw_DIN_912_M12x110" accessRefs="#id10" subType="smc Revision" masterRef="#id63" revision="A"> <UserData id="id60"> <UserValue value="2011-09-27T15:11:03" title="last_mod_date"/> <UserValue value="10002600/A-Screw_DIN_912_M12x110" title="object_string"/> </UserData> <AssociatedDataSet id="id61" dataSetRef="#id53" role="IMAN_specification"/> <AssociatedDataSet id="id62" dataSetRef="#id50" role="IMAN_Rendering"/> </ProductRevision> <ProductRevision id="id68" name="Testassembly Klotz" accessRefs="#id10" subType="smc Revision" masterRef="#id71" revision="D"> <UserData id="id69"> <UserValue value="2011-09-12T09:49:42" title="last_mod_date"/> <UserValue value="10002599/D-Testassembly Klotz" title="object_string"/> </UserData> <AssociatedDataSet id="id70" dataSetRef="#id9" role="IMAN_specification"/> </ProductRevision> <Product id="id37" name="Testpart Klotz" accessRefs="#id10" subType="smc" productId="10002598"/> <Product id="id63" name="Screw_DIN_912_M12x110" accessRefs="#id10" subType="smc" productId="10002600"/> <Product id="id71" name="Testassembly Klotz" accessRefs="#id10" subType="smc" productId="10002599"/> <ProductDef id="id38"> <InstanceGraph id="id39"> <UserData id="id40" type="TC Specific Properties"> <UserValue value="precise" title="BOM_precision_type"/> </UserData> <ProductInstance id="id41" partRef="#id42" transformRef="id43" sequenceNumber="10" quantity="1"> <ApplicationRef version="QrMAAkR0xf7CIA" application="Teamcenter" label="D0EAAQBvxf7CIA"/> <UserData id="id44" type="InstanceNotes"> <UserValue value="10002598.par:1" title="AIE_OCC_NAME"/> <UserValue value="Occ Id327" title="SE ObjectID"/> </UserData> <Transform id="id43">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</Transform> </ProductInstance> <ProductInstance id="id64" partRef="#id65" transformRef="id66" sequenceNumber="20" quantity="1"> <ApplicationRef version="QvBAAkR0xf7CIA" application="Teamcenter" label="D0KAAQBvxf7CIA"/> <UserData id="id67" type="InstanceNotes"> <UserValue value="Screw_DIN_912_M12x110_v9.00.par:1" title="AIE_OCC_NAME"/> <UserValue value="Occ Id352" title="SE ObjectID"/> </UserData> <Transform id="id66">0 0 -1 0 1 0 0 0 0 -1 0 0 0.0256679460279 0.008500000000000001 -0.029499023116 1</Transform> </ProductInstance> <ProductRevisionView id="id42" accessRefs="#id10" revisionRef="#id33"> <ApplicationRef version="D0EAAQBvxf7CIA" application="Teamcenter" label="ieCAAQBvxf7CIA/D0EAAQBvxf7CIA/"/> </ProductRevisionView> <ProductRevisionView id="id65" accessRefs="#id10" revisionRef="#id59"> <ApplicationRef version="D0KAAQBvxf7CIA" application="Teamcenter" label="DYBAAQBvxf7CIA/D0KAAQBvxf7CIA/"/> </ProductRevisionView> </InstanceGraph> </ProductDef> <RevisionRule id="id2" name="01_Load_as_saved"> <Description>Latest Working else Latest Any Status</Description> </RevisionRule> <ProductView id="id4" ruleRefs="#id2" rootRefs="id6" primaryOccurrenceRef="id6"> <UserData id="id3" type="TC Specific Properties"> <UserValue value="precise" title="BOM_precision_type"/> </UserData> <AssociatedAttachment id="id8" attachmentRef="#id9" role="IMAN_specification"/> <AssociatedAttachment id="id16" attachmentRef="#id17" role="IMAN_master_form"/> <AssociatedAttachment id="id23" attachmentRef="#id24" role="IMAN_Rendering"/> <AssociatedAttachment id="id26" attachmentRef="#id27" role="IMAN_specification"/> <AssociatedAttachment id="id30" attachmentRef="#id31" role="IMAN_master_form"/> <AssociatedAttachment id="id49" attachmentRef="#id50" role="IMAN_Rendering"/> <AssociatedAttachment id="id52" attachmentRef="#id53" role="IMAN_specification"/> <AssociatedAttachment id="id56" attachmentRef="#id57" role="IMAN_master_form"/> <Occurrence id="id6" instancedRef="#id68" associatedAttachmentRefs="#id8 #id16" occurrenceRefs="id20 id46"> <UserData id="id7" type="AttributesInContext"> <UserValue value="" title="AO_ID"/> <UserValue value="" title="SequenceNumber"/> <UserValue value="" title="OccurrenceName"/> <UserValue value="" title="Quantity"/> </UserData> <Transform id="id5">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</Transform> </Occurrence> <Occurrence id="id20" instancedRef="#id33" instanceRefs="#id41" associatedAttachmentRefs="#id23 #id26 #id30" parentRef="#id6"> <UserData id="id21" type="AttributesInContext"> <UserValue value="" title="AO_ID"/> <UserValue value="10" title="SequenceNumber"/> <UserValue value="" title="OccurrenceName"/> <UserValue value="1" title="Quantity"/> </UserData> <UserData id="id22" type="InstanceNotes"> <UserValue value="10002598.par:1" title="AIE_OCC_NAME"/> <UserValue value="Occ Id327" title="SE ObjectID"/> </UserData> <Transform id="id19">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</Transform> </Occurrence> <Occurrence id="id46" instancedRef="#id59" instanceRefs="#id64" associatedAttachmentRefs="#id49 #id52 #id56" parentRef="#id6"> <UserData id="id47" type="AttributesInContext"> <UserValue value="" title="AO_ID"/> <UserValue value="20" title="SequenceNumber"/> <UserValue value="" title="OccurrenceName"/> <UserValue value="1" title="Quantity"/> </UserData> <UserData id="id48" type="InstanceNotes"> <UserValue value="Screw_DIN_912_M12x110_v9.00.par:1" title="AIE_OCC_NAME"/> <UserValue value="Occ Id352" title="SE ObjectID"/> </UserData> <Transform id="id45">0 0 -1 0 1 0 0 0 0 -1 0 0 0.0256679460279 0.008500000000000001 -0.029499023116 1</Transform> </Occurrence> </ProductView> <DataSet id="id9" name="10002599/B" accessRefs="#id10" version="1" memberRefs="#id13 #id14 #id15" type="SE Assembly"/> <AccessIntent id="id10" intent="reference" ownerRefs="#id11"/> <Site id="id11" name="IMC-528199808" siteId="528199808"> <UserData id="id12"> <UserValue value="1" title="dbms"/> </UserData> </Site> <ExternalFile id="id13" accessRefs="#id10" locationRef="10002599.asm" format="asm"/> <ExternalFile id="id14" accessRefs="#id10" locationRef="10002599.cfg" format="cfg"/> <ExternalFile id="id15" accessRefs="#id10" locationRef="10002599_asm.qaf" format="qaf"/> <Form id="id17" name="10002599/D" accessRefs="#id10" subType="smc Revision Master" subClass="smc Revision Master"> <UserData id="id18" type="FormAttributes"> <UserValue type="int" value="1" title="assemblyType"/> </UserData> </Form> <DataSet id="id24" name="10002598/B" accessRefs="#id10" version="5" memberRefs="#id25" type="DirectModel"> <Description>JT File for SE Part</Description> </DataSet> <ExternalFile id="id25" accessRefs="#id10" locationRef="10002598.jt" format="jt"/> <DataSet id="id27" name="10002598/B" accessRefs="#id10" version="5" memberRefs="#id28 #id29" type="SE Part"/> <ExternalFile id="id28" accessRefs="#id10" locationRef="10002598.par" format="par"/> <ExternalFile id="id29" accessRefs="#id10" locationRef="10002598_par.qaf" format="qaf"/> <Form id="id31" name="10002598/B" accessRefs="#id10" subType="smc Revision Master" subClass="smc Revision Master"> <UserData id="id32" type="FormAttributes"> <UserValue type="int" value="1" title="assemblyType"/> </UserData> </Form> <DataSet id="id50" name="10002600/A" accessRefs="#id10" version="3" memberRefs="#id51" type="DirectModel"> <Description>JT File for SE Part</Description> </DataSet> <ExternalFile id="id51" accessRefs="#id10" locationRef="Screw_DIN_912_M12x110_v9.00.jt" format="jt"/> <DataSet id="id53" name="10002600/A" accessRefs="#id10" version="3" memberRefs="#id54 #id55" type="SE Part"/> <ExternalFile id="id54" accessRefs="#id10" locationRef="Screw_DIN_912_M12x110_v9.00.par" format="par"/> <ExternalFile id="id55" accessRefs="#id10" locationRef="Screw_DIN_912_M12x110_v9.00_par.qaf" format="qaf"/> <Form id="id57" name="10002600/A" accessRefs="#id10" subType="smc Revision Master" subClass="smc Revision Master"> <UserData id="id58" type="FormAttributes"> <UserValue type="int" value="1" title="assemblyType"/> </UserData> </Form> </PLMXML>
这篇关于Visual Studio 2010(XslTransformException)与xalan:nodeset()函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!