Revision 12439 trunk/libraries/libGPE/src/org/gvsig/xmlschema/utils/SchemaDocumentBuilder.java
SchemaDocumentBuilder.java | ||
---|---|---|
56 | 56 |
* |
57 | 57 |
* $Id$ |
58 | 58 |
* $Log$ |
59 |
* Revision 1.3 2007-06-28 13:04:33 jorpiell |
|
59 |
* Revision 1.4 2007-07-02 09:57:35 jorpiell |
|
60 |
* The generated xsd schemas have to be valid |
|
61 |
* |
|
62 |
* Revision 1.3 2007/06/28 13:04:33 jorpiell |
|
60 | 63 |
* The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class |
61 | 64 |
* |
62 | 65 |
* Revision 1.2 2007/06/22 12:20:48 jorpiell |
... | ... | |
115 | 118 |
* A new schema |
116 | 119 |
* @throws SchemaCreationException |
117 | 120 |
*/ |
118 |
public IXSSchema createXSSchema(String namespaceURI) throws SchemaCreationException { |
|
121 |
public IXSSchema createXSSchema(String namespaceURI, String namespacePrefix) throws SchemaCreationException {
|
|
119 | 122 |
IXSSchema schema; |
120 | 123 |
try { |
121 | 124 |
Document document = getBuilder().newDocument(); |
122 | 125 |
Element element = document.createElement(SchemaTags.SCHEMA_ROOT); |
123 | 126 |
element.setAttribute(SchemaTags.XMLNS_NS + ":" + SchemaTags.XS_NS, |
124 | 127 |
SchemaTags.XS_NS_URI); |
125 |
element.setAttribute(SchemaTags.XMLNS_NS + ":" + SchemaTags.GML_NS,
|
|
126 |
SchemaTags.GML_NS_URI);
|
|
128 |
element.setAttribute(SchemaTags.XMLNS_NS + ":" + namespacePrefix,
|
|
129 |
namespaceURI);
|
|
127 | 130 |
element.setAttribute(SchemaTags.TARGET_NAMESPACE, |
128 | 131 |
namespaceURI); |
129 | 132 |
document.appendChild(element); |
Also available in: Unified diff