[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[stp-dev] Problems adding policy assertion
|
Hi David,
XEF editor throws following exception by adding new policy assertion for
the some assertions namespaces:
org.jdom.IllegalNameException: The name "1.1" is not legal for JDOM/XML
Namespace prefixs: Namespace prefixes cannot begin with a number.
at org.jdom.Namespace.getNamespace(Namespace.java:156)
at org.jdom.Element.<init>(Element.java:183)
at
org.eclipse.stp.xef.XMLInstanceElement.<init>(XMLInstanceElement.java:51)
at
org.eclipse.stp.xef.XMLInstanceElement.<init>(XMLInstanceElement.java:47)
at
org.eclipse.stp.ui.xef.editor.XefEditMasterDetailsBlock$AddButtonSelectionListener.handleAddPolicy(XefEditMasterDetailsBlock.java:396)
...
This happens due to prefix for assertion element is creating using
SchemaElement.getShortNameSpace() which returns for namespace
http://types.sopware.org/qos/SOPAssertions/1.1
prefix "1.1"
Probably more correct way to get namespace prefix is retrieve it from
schema:
<xs:schema xmlns="http://types.sopware.org/qos/SOPAssertions/1.1"
xmlns:sopa="http://types.sopware.org/qos/SOPAssertions/1.1"
...
Using default namespace can be possible to get 'sopa' as prefix.
--
Regards, Alexey