- Timestamp:
- 11/20/12 09:53:11 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/test/DEBBTranslator/xml/PLMXMLTranslator.xsl
r629 r630 3 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:plm="http://www.plmxml.org/Schemas/PLMXMLSchema" 4 4 xmlns:cim="http://www.coolemall.eu/DEBBComponent" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 5 6 <!-- Importing xslt for translating debb components --> 5 7 <xsl:import href="DEBBComponentTranslator.xsl" /> 8 6 9 <!-- Specification of the output document --> 7 10 <xsl:output method="xml" version="1.0" encoding="UTF-8" 8 11 indent="yes" /> 9 12 13 <!-- Root of the PLM XML document --> 14 <xsl:variable name="rootDoc" select="/" /> 10 15 11 <xsl:variable name="rootDoc" select="/" /> 16 <!-- Default DEBBComponents file name (used if it is not specified in PLM 17 XML file) --> 18 <xsl:variable name="defaultDEBBComponentsFileName" select="'DEBBComponents.xml'" /> 12 19 13 20 … … 49 56 <xsl:variable name="debbComponentId" 50 57 select="plm:UserData/plm:UserValue[@title='DEBBComponentId']/@value" /> 58 <xsl:variable name="debbComponentFile" 59 select="plm:UserData/plm:UserValue[@title='DEBBComponentFile']/@value" /> 60 51 61 <xsl:attribute name="name"> 52 62 <xsl:value-of select="$debbComponentId" /> 53 63 </xsl:attribute> 54 <xsl:variable name="nestedDoc" select="document('DEBBComponents.xml')" /> 55 <xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" /> 64 <xsl:choose> 65 <xsl:when test="debbComponentFile != ''"> 66 <xsl:variable name="nestedDoc" select="document($debbComponentFile)" /> 67 <xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" /> 68 </xsl:when> 69 <xsl:otherwise> 70 <xsl:variable name="nestedDoc" 71 select="document($defaultDEBBComponentsFileName)" /> 72 <xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" /> 73 </xsl:otherwise> 74 </xsl:choose> 75 76 56 77 <xsl:for-each select="1 to count($tokenizedText)"> 57 78 <xsl:variable name="index" select="." />
Note: See TracChangeset
for help on using the changeset viewer.