<STEP-ProductInformation ExportTime="2018-01-29 12:45:47" ExportContext="fr_FR" ContextID="defaultcontext" WorkspaceID="Approved"
UseContextLocale="true">
<Qualifiers>
<Qualifier ID="Qualifier root">
<DimensionPointLink DimensionPointID="Qualifier root"/>
</Qualifier>
<Qualifier ID="AllCountries">
<DimensionPointLink DimensionPointID="AllCountries"/>
</Qualifier>
<Qualifier ID="std.lang.all">
<DimensionPointLink DimensionPointID="std.lang.all"/>
</Qualifier>
<Qualifier ID="de">
<DimensionPointLink DimensionPointID="de"/>
</Qualifier>
<Qualifier ID="DE">
<DimensionPointLink DimensionPointID="DE"/>
</Qualifier>
<Qualifier ID="fr">
<DimensionPointLink DimensionPointID="fr"/>
</Qualifier>
<Qualifier ID="FR">
<DimensionPointLink DimensionPointID="FR"/>
</Qualifier>
</Qualifiers>
<Classifications>
<Classification ID="Level3_1234" UserTypeID="TEST" ParentID="Level2_1234">
<Name ContextID="de_DE" QualifierID="de" Changed="true">CHANGE TRANS EXP</Name> <Name ContextID="fr_FR" QualifierID="de"
Changed="true">CHANGE TRANS EXP</Name> <MetaData>
<Value AttributeID="ATTR" ContextID="de_DE" QualifierID="de" Changed="true">TEST</Value>
<Value AttributeID="ATTR" ContextID="de_DE" QualifierID="de" Changed="true">TEST</Value>
</MetaData>
</Classification>
</Classifications>
</STEP-ProductInformation>
I am currently seeking to make the following changes:
In the example XML above, I am looking to
- Ignore the "ParentID" value (to be found in the node)
- Ignore the "WorkspaceID" value (to be found in the node)
- Add another value to each node saying: Translation_Status=UpToDate
I have already been able to exclude the attribute values "Name" and "Value" with "contextID=de_De" by using the the following XSLT:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Name[@ContextID='de_DE']"></xsl:template>
<xsl:template match="Value[@ContextID='de_DE']"></xsl:template>
</xsl:stylesheet>
Now I would ideally like to add points 1,2 and 3 to this XSLT stylesheet.
Any help would be greatly appreciated!
ParentIDattribute? Then use the same approach, add an empty template<xsl:template match="Classification/@ParentID"/>. - Martin HonnenTranslation_Status=UpToDateindicate you want to add an attribute namedTranslation_Statuswith the valueUpToDate? What does "each node" mean, do you really want to put such an attribute on all elements in the document? - Martin HonnenTranslation_Status, which indeed has a value calledUpToDate. Essentially, we want to add this attribute to every Classification (in this case there is only one classification in our XML: ID=Level3_1234). I was thinking we could add it as<Value AttributeID="Translation_Status" ContextID="de_DE" QualifierID="de">UpToDate</Value>below the other attribute "TEST" - AlexD