Plm XML код, который я экспортируемые из менеджера структуры Teamcenter здеськак преобразовать Plm XML в Excel с помощью XSLT
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="check_new.xsl"?>
<!-- GENERATED BY: PLM XML SDK 7.0.3.285 -->
<PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema"
schemaVersion="6" language="en-us" date="2014-12-30" time="18:11:34" author="Teamcenter V10000.1.0.20130604.00 - [email protected](-1989821519)">
<Header id="id1" traverseRootRefs="#id7" transferContext="new_transfermode"></Header>
<RevisionRule id="id2" name="Latest Working">
<Description>Latest Working else Latest Any Status</Description>
<ApplicationRef version="QEaRaYqhYa1ubA" application="Teamcenter" label="QEaRaYqhYa1ubA"></ApplicationRef></RevisionRule>
<ProductView id="id4" ruleRefs="#id2" rootRefs="id7" primaryOccurrenceRef="id7">
<ApplicationRef application="Teamcenter" label="QvfRqkT9Ya1ubA/QEaRaYqhYa1ubA/AAAAAAAAAAAAAA/BOM"></ApplicationRef>
<UserData id="id3" type="TC Specific Properties">
<UserValue value="imprecise" title="BOM_precision_type"></UserValue></UserData>
<Occurrence id="id7" occurrenceRefs="id11 id15">
<ApplicationRef application="Teamcenter" label="QvfRqkT9Ya1ubA/"></ApplicationRef>
<UserData id="id6">
<UserValue value="" title="bl_quantity"></UserValue></UserData>
<UserData id="id8" type="AttributesInContext">
<UserValue value="" title="AO_ID"></UserValue>
<UserValue value="" title="SequenceNumber"></UserValue>
<UserValue value="" title="OccurrenceName"></UserValue>
<UserValue value="" title="Quantity"></UserValue></UserData>
<Transform id="id5">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</Transform></Occurrence>
<Occurrence id="id11" parentRef="#id7">
<ApplicationRef application="Teamcenter" label="QvfRqkT9Ya1ubA/Q3YRqkT9Ya1ubA/"></ApplicationRef>
<UserData id="id10">
<UserValue **value="10"** title="bl_quantity"></UserValue></UserData>
<UserData id="id12" type="AttributesInContext">
<UserValue value="" title="AO_ID"></UserValue>
<UserValue value="10" title="SequenceNumber"></UserValue>
<UserValue value="" title="OccurrenceName"></UserValue>
<UserValue value="10" title="Quantity"></UserValue></UserData>
<Transform id="id9">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</Transform></Occurrence>
<Occurrence id="id15" parentRef="#id7">
<ApplicationRef application="Teamcenter" label="QvfRqkT9Ya1ubA/gTVRqkT9Ya1ubA/"></ApplicationRef>
<UserData id="id14">
<UserValue **value="15"** title="bl_quantity"></UserValue></UserData>
<UserData id="id16" type="AttributesInContext">
<UserValue value="" title="AO_ID"></UserValue>
<UserValue value="20" title="SequenceNumber"></UserValue>
<UserValue value="" title="OccurrenceName"></UserValue>
<UserValue value="15" title="Quantity"></UserValue></UserData>
<Transform id="id13">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</Transform></Occurrence></ProductView></PLMXML>
код XSL:
<?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="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40" >
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title>Admin - Item Ownership</title>
</head>
<body BGCOLOR="#FFFFFF" link="#0000FF" vlink="#660066">
<table>
<tr align="center" bgcolor="#B8CFEP">
<!-- 1st row -->
<th>part a</th>
</tr>
<tr>
<td>
<xsl:value-of select="/plm:PLMXML/plm:Header/plm:ProductView/plm:UserData/plm:UserValue/title=bl_quantity"/>
</td> </tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Мне нужно отобразить значения 10 и 15 (bl_quantity) в листе excel. Но я не получаю никаких результатов. Правильно ли синтаксис value-of select?
я отвалил свой вопрос к своей первоначальной форме. Пожалуйста, задайте новый вопрос с новой проблемой. –
Ссылка на новый номер: http://stackoverflow.com/q/27855219/2822719 –