Hi all,
I need to transform a XML document created by an UML case tool. I have
a UML1.4 DTD file from OMG and I want to do a validation of XML file
with this DTD. Here is an excerpt from XML file
<?xml version="1.0" encoding= "ISO-8859-1"?>
<!DOCTYPE XMI SYSTEM "uml14.dtd">
<XMI xmi.version="1.1" xmlns:UML = 'href://org.omg/UML/1.3'>
<XMI.header>
<XMI.metamodel xmi.name="UML" xmi.version="1.4" />
</XMI.header>
<XMI.content>
<UML:Model>
<UML:Namespace.ownedElement>
<UML:Stereotype xmi.id = 'STID_1'
name = 'UserInput'>
</UML:Stereotype>
</UML:Namespace.ownedElement>
</UML:Model>
</XMI.content>
</XMI>
The transformation (and validation) has to be performed by calling
command-line utility Xalan.exe. The problem is that it raises the
following error:
Fatal Error at (file C:\temp\uml14.dtd, line 187, column 31): Colons are
not allowed in this name when namespaces are enabled
SAXParseException: Colons are not allowed in this name when namespaces
are enabled (C:\temp\uml14.dtd, line 187, column 31)
On the line 187 in uml14.dtd, there is a following:
<!ENTITY % UML:AggregationKind '(none|aggregate|composite)'>
If I remove UML: prefix from both DTD and XML file, validation is OK.
My questions are:
- Does Xalan support validation when there is namespace prefixes in
DTD?
- If yes, what can I do with Xalan.exe to enable it? Should I modify
code in XalanExe.cpp?
Thanks in advance,
Ilian