4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.57 $ |
* @version $Revision: 1.58 $ |
* |
* Last modification: $Date: 2003/07/23 11:14:14 $ |
* $Id: OurDocument.java,v 1.57 2003/07/23 11:14:14 smcsporr Exp $ |
* Last modification: $Date: 2003/07/23 15:39:51 $ |
* $Id: OurDocument.java,v 1.58 2003/07/23 15:39:51 hjokusch Exp $ |
*/ |
|
package src.document; |
43,7 → 43,7 |
* |
* @author S. McSporran |
* |
* @version $Revision: 1.57 $ Last modification: $Date: 2003/07/23 11:14:14 $ |
* @version $Revision: 1.58 $ Last modification: $Date: 2003/07/23 15:39:51 $ |
*/ |
public class OurDocument { |
|
253,13 → 253,24 |
/* Get the root element. */ |
Element rootElement = changeDoc.getDocumentElement(); |
|
/* Set a new schemaLocation attribute on the document element. */ |
rootElement.setAttribute("xsi:schemaLocation", schemaFile.getPath()); |
myDocument = changeDoc; |
if (rootElement.hasAttribute("xsi:schemaLocation")) { |
|
System.out.println(rootElement.getAttributeNode("xsi:schemaLocation").getName()); |
System.out.println(rootElement.getAttributeNode("xsi:schemaLocation").getOwnerElement()); |
System.out.println(rootElement.getAttributeNode("xsi:schemaLocation").getValue()); |
|
/* Set a new schemaLocation attribute on the document element. */ |
rootElement.setAttribute("xsi:schemaLocation", "http://www.techfak.uni-bielefeld.de/CVSchema/sopra" + |
" " + schemaFile.getName()); |
|
myDocument = changeDoc; |
|
log(LogInterface.TYPE_INFO, "Schema changed to: " + schemaFile.getName()); |
} |
} |
|
/** |
* The methode <code>changeDTDGrammar</code> changes a document's DTD. |
* The method <code>changeDTDGrammar</code> changes a document's DTD. |
* |
* @param changeDoc: The document who's associated DTD should be changed. |
* @param dtdFile: The new DTD's path and filename as <code>File</code>-object. |
398,12 → 409,16 |
|
/** |
* <code>domToString</code> converts a DOM document instance into |
* a <code>String</code> representation. |
* a <code>String</code> representation. This method is used to save an |
* image of the last saved document and is called by the <code>setSaved</code> |
* method. |
* |
* @param docuNode: The root node of the document to transform. |
* @param docuNode: The document to transform. |
* |
* @return A string representation of the document. |
* |
* @see src.document.OurDocument#setSaved |
* |
* author Group 5 |
* |
* Last revision: 21-Jul-2003 by H. Jakusch |