<commit_before>package gov.nih.nci.cbiit.cmts.transform.artifact;

import java.io.IOException;
import java.io.Writer;

import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Namespace;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;



public class XSLTStylesheet extends Document  {
	private String xsltPrefix="xsl";
	private String xsltUri="http://www.w3.org/1999/XSL/Transform";
	protected static Namespace xsltNamespace=Namespace.getNamespace("xsl","http://www.w3.org/1999/XSL/Transform");
	public XSLTStylesheet()
	{
		super();
		XSLTElement xlstRoot = new XSLTElement("transform");
		xlstRoot.setAttribute("version", "1.0");
		setRootElement(xlstRoot);
		XSLTElement outputElement=new XSLTElement("output");
		outputElement.setAttribute("method","xml");
		xlstRoot.addContent(outputElement);
	}

	/**
	 * <xsl:template> is top level element, add it to the root element 
	 * @param template
	 */
	public void addTempate(Element template)
	{
		getRootElement().addContent(template);
	}
	public void writeOut(Writer out) throws IOException
	{
		Format outFormat=Format.getPrettyFormat();
		outFormat.setLineSeparator("\n");
		XMLOutputter xmlOut=new XMLOutputter(outFormat);
//		xmlOut.getFormat().setEncoding("ISO-8859-1");
//		xmlOut.getFormat().setLineSeparator("\n");
		xmlOut.output(this, out);
	}
}<commit_msg>add XMLSchema namespace with prefix "xs" to use schema datatype xs:date()<commit_after>package gov.nih.nci.cbiit.cmts.transform.artifact;

import java.io.IOException;
import java.io.Writer;

import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Namespace;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;



public class XSLTStylesheet extends Document  {
	protected static Namespace xsltNamespace=Namespace.getNamespace("xsl","http://www.w3.org/1999/XSL/Transform");
	private static Namespace xsNamespace=Namespace.getNamespace("xs","http://www.w3.org/2001/XMLSchema");
	public XSLTStylesheet()
	{
		super();
		XSLTElement xlstRoot = new XSLTElement("transform");
		xlstRoot.addNamespaceDeclaration(xsNamespace);
		xlstRoot.setAttribute("version", "1.0");
		setRootElement(xlstRoot);
		XSLTElement outputElement=new XSLTElement("output");
		outputElement.setAttribute("method","xml");
		xlstRoot.addContent(outputElement);
	}

	/**
	 * <xsl:template> is top level element, add it to the root element 
	 * @param template
	 */
	public void addTempate(Element template)
	{
		getRootElement().addContent(template);
	}
	public void writeOut(Writer out) throws IOException
	{
		Format outFormat=Format.getPrettyFormat();
		outFormat.setLineSeparator("\n");
		XMLOutputter xmlOut=new XMLOutputter(outFormat);
//		xmlOut.getFormat().setEncoding("ISO-8859-1");
//		xmlOut.getFormat().setLineSeparator("\n");
		xmlOut.output(this, out);
	}
}
{'fraction_non_alphanumeric': 0.1356534090909091, 'fraction_numerical': 0.012073863636363636, 'mean_word_length': 5.643867924528302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7063367', 'n_tokens_mistral': 997, 'n_tokens_neox': 921, 'n_words': 169}