Commit 296bc5bf authored by Pakulin's avatar Pakulin
Browse files

Initial commit of the XmlDiff tool that is used to verify XML documents...

Initial commit of the XmlDiff tool that is used to verify XML documents generated by TTCN3 tools during testing.
parent 4b3c4d38
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
	<classpathentry kind="output" path="bin"/>
</classpath>

tools/XmlDiff/.project

0 → 100644
+17 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>XmlDiff</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
	</natures>
</projectDescription>
+11 −0
Original line number Diff line number Diff line
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
+29 −0
Original line number Diff line number Diff line
package org.etsi.mts.ttcn.part9.xmldiff;

/** This class implements an algorithm to compare two XML files.
 * 
 * It is used as a utility in the ETSI STF on conformance testing for XSD processing (TTCN3 Part 9 specification).
 * @author pakulin
 *
 */
public class XmlDiff {
	/** Initialize the diff engine.
	 * 
	 * @param referenceXmlFile path to the reference XML file
	 * 
	 * @param xsdSearchPath optional list of folder names and/or URIs where to look for XSD files. 
	 * 	May be <code>null</code>.
	 */
	public XmlDiff(String referenceXmlFile, String[] xsdSearchPath) {
		
	}
	
	/** Compare an XML document against the reference one.
	 * @param input the text of the XML document
	 * @param errorMessage container to store details of differences. May be <code>null</code>
	 * @return <code>true</code> if the documents match and <code>false</false> otherwise.
	 */
	public boolean diff(String input, StringBuilder diffDetails) {
		return true;
	}
}