|
|
Re: disable attribute xmlns writing [message #522782 is a reply to message #522435] |
Tue, 23 March 2010 17:06 |
Eclipse User |
|
|
|
Originally posted by: murbieta.gpi.com.ar
Hi Ed, i follow your advice and when comparing realize that i was
missing to add "qualified" parameter in metadata annotation.
It was solved as following:
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model"
nsURI="..." nsPrefix="..">
<!-- this annotation avoids writing namespace information -->
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="qualified" value="false"/>
</eAnnotations>
...
regards
Ed Merks escribió:
> Matias,
>
> Write a simple schema, without a target namespace, for the XML you want
> to achieve, build the model project for it, look closely at the
> XyzResourceFactoryImpl's options and at the extended meta data
> annotations on the Xyz EPackage. You'll want to replicate that for your
> specific model.
>
>
> Matias Urbieta wrote:
>> Hi, i'm trying to write a xml using EMF that must be compliant with a
>> dtd. In order to achieve this goal i have removed name spaces and also
>> added doct type information. But i can't find the way for desabling
>> xmlns attribute in the generated xml. The generated xml looks like:
>>
>> <?xml version="1.0" encoding="ASCII"?>
>> <!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow
>> 2.6//EN" "http://www.opensymphony.com/osworkflow/workflow_2_6.dtd">
>> <workflow xmlns="http://myexample"/>
>>
>> and must look like:
>>
>> <?xml version="1.0" encoding="ASCII"?>
>> <!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow
>> 2.6//EN" "http://www.opensymphony.com/osworkflow/workflow_2_6.dtd">
>> <workflow />
>>
>> thanks in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.03630 seconds