mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
initial dojo generator. moving to dojo nightly build and checking in the widget libraries as well.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3488 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -76,15 +76,27 @@ public class TemplatingService
|
||||
return new TemplateTypeImpl(name, schema);
|
||||
}
|
||||
|
||||
public void writeXML(final Node d, final File output)
|
||||
public Document newDocument()
|
||||
throws ParserConfigurationException,
|
||||
SAXException,
|
||||
IOException
|
||||
{
|
||||
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
dbf.setNamespaceAware(true);
|
||||
dbf.setValidating(false);
|
||||
final DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
return db.newDocument();
|
||||
}
|
||||
|
||||
public void writeXML(final Node n, final Writer output)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.out.println("writing out a document for " + d.getNodeName() +
|
||||
System.out.println("writing out a document for " + n.getNodeName() +
|
||||
" to " + output);
|
||||
final TransformerFactory tf = TransformerFactory.newInstance();
|
||||
final Transformer t = tf.newTransformer();
|
||||
t.transform(new DOMSource(d), new StreamResult(output));
|
||||
t.transform(new DOMSource(n), new StreamResult(output));
|
||||
}
|
||||
catch (TransformerException te)
|
||||
{
|
||||
@@ -93,6 +105,13 @@ public class TemplatingService
|
||||
}
|
||||
}
|
||||
|
||||
public void writeXML(final Node n, final File output)
|
||||
throws IOException
|
||||
{
|
||||
|
||||
this.writeXML(n, new FileWriter(output));
|
||||
}
|
||||
|
||||
public Document parseXML(final String source)
|
||||
throws ParserConfigurationException,
|
||||
SAXException,
|
||||
|
Reference in New Issue
Block a user