RTC - Repository : How to Revert Back the Changes
HOW TO REVERT BACK THE CHANGES WHICH HAVE COMMITED INTO RTC REPOSITORY:
= IN ECLIPSE
- Right click on the owning component in the Pending Changes view and select Show->History. The change set will appear in the History view.
- Right click on the change set and choose Discard... This will discard the change set from your workspace. So your workspace should now have all change from the stream *except* the one you want to remove. You can verify this by checking that your bad change set is the only thing you see Incoming.
- Right click on the component and choose "Replace in [your stream name]..."
RTC (Jazz) : How to point your stream to
different stream and take codes into your local:
Example: you have local worskapce set up
from dev stream, but now you have PATCH stream and want to take latest code.
Go to ‘Pending Changes’
and select “Change Flow Target” to the required stream.
How to remove namespace from xml
file ?
Step 1:
Write an xslt
and save inside class path: “removeNameSpace.xslt” à
xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:template match="*">
<xsl:element name="{local-name(.)}">
<xsl:apply-templates
select="@* |
node()" />
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name(.)}">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
Step 2:
public String
purifyXml(String xmlResponse) throws IOException, TransformerException,
SAXException {
Source xslt1 = new StreamSource( (“removeNameSpace.xslt”));
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer( xslt1);
StringReader reader = new StringReader(xmlResponse);
StringWriter writer = new StringWriter();
transformer.transform(
new javax.xml.transform.stream.StreamSource(reader),
new
javax.xml.transform.stream.StreamResult(writer));
String
result = writer.toString();
return result;
}
Comments