public class AnalyzeSchemas
extends java.lang.Object
Usage: java nl.nictiz.xml.util.AnalyzeSchemas inputDir|inputFile [ outputFile ]
Builds xmlschemainfo.xml from one XML schema file, or a full directory of schemas containing:
<files> <file file="COCT_MT000003NL.xsd" full="-full path-/COCT_MT000003NL.xsd" hl7type="cmet"> <uses exists="true" file="datatypes.xsd" full="-full path-/datatypes.xsd"/> <uses exists="true" file="voc.xsd" full="-full path-/voc.xsd"/> <uses exists="true" file="infrastructureRoot.xsd" full="-full path-/infrastructureRoot.xsd"/> <uses exists="false" file="COCT_MT150003NL.xsd" full="-full path-/COCT_MT150003NL.xsd"/> ... <used-in file="POOR_IN002150NL.xsd" full="-full path-/POOR_IN002150NL.xsd"/> <used-in file="POOR_MT200999NL.xsd" full="-full path-/POOR_MT200999NL.xsd"/> ... </file> ... </files>
Where:
Constructor and Description |
---|
AnalyzeSchemas() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getIncludes(java.lang.String fileName)
This method does the work for main
|
static void |
getIncludes(java.lang.String fileName,
java.util.Vector<java.lang.String> vectorOfIncludes,
org.w3c.dom.Document doc,
org.w3c.dom.Element fileElement) |
static void |
main(java.lang.String[] argv) |
public static void main(java.lang.String[] argv)
argv
- Accepts a relative or absolute file or directory as its first mandatory argument, and optionally accepts a file as its second arguments. The first argument is used to determine the list of includes, the second to write the results in, default is to screen.public static java.lang.String getIncludes(java.lang.String fileName) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException, javax.xml.transform.TransformerException
fileName
- Fully qualified file name to get includes ofjavax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
javax.xml.transform.TransformerException
public static void getIncludes(java.lang.String fileName, java.util.Vector<java.lang.String> vectorOfIncludes, org.w3c.dom.Document doc, org.w3c.dom.Element fileElement) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
fileName
- Fully qualified file name to get includes ofvectorOfIncludes
- doc
- fileElement
- javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException