|
Re: namespace prefixes [message #1008331 is a reply to message #1008053] |
Mon, 11 February 2013 23:05 |
|
Hi Rui,
I'm not sure why this would cause you problems, but you could create a default XML namespace in the <definitions> root element, like this:
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
If you absolutely must, you can override the createDocumentRoot() method in Bpmn2ModelerFactory like this:
@Override
public DocumentRoot createDocumentRoot() {
DocumentRootImpl documentRoot = new Bpmn2ModelerDocumentRootImpl() {
public Map<String, String> getXMLNSPrefixMap() {
if (xMLNSPrefixMap == null) {
xMLNSPrefixMap = super.getXMLNSPrefixMap();
xMLNSPrefixMap.map().put("", Bpmn2Package.eNS_URI);
}
};
return documentRoot;
}
However, this means that your extension model's DocumentRoot MUST extend the BPMN2 metamodel DocumentRoot class, and your extension model resource factory MUST extend Bpmn2ModelerFactory.
Let me know if you run into problems.
Cheers!
Bob
|
|
|
|
Powered by
FUDForum. Page generated in 0.03303 seconds