Dear Mr Shafie, Not so good news...I would not say, that we make heavy use of namespaces. Just in the MathML and in the DCMI. Your first suggestion (change editor) would put us back to square 1. I can try the automatic conversion, although I have no idea about unwanted side effects (dtd-invalid xml-data). So I have 3 questions (which have little to do with xmlmind):
- What parameters do you recommnd for the "trang dtd input module (http://www.thaiopensource.com/relaxng/trang-manual.html#dtd-input)"? - Will the XML-file still "look like now" (dtd-declaration and to on...) even if it is checked by the schema - Do you recommend XML schema or RELAX NG? Kindest regards Thomas Dumm > -----Urspr?ngliche Nachricht----- > Von: Hussein Shafie [mailto:hussein at xmlmind.com] > Gesendet: Montag, 16. November 2009 12:33 > An: t.dumm at compendio.ch > Cc: xmleditor-support at xmlmind.com > Betreff: Re: [XXE] When does XMLmind write the DCMI namespace URI? > > After a lot of thoughts about this issue. I'm sorry to inform > you that next version XXE v4.5.1 (to be released in a couple > of weeks) will *not* solve your problem. > > What is described as method #2 below is not really better > than current method #1. Therefore, we don't see any > advantages in implementing it. > > In summary, in all cases but the simplest ones, XMLmind XML > Editor will > *never* be able to generate documents in which xmlns > attributes pass the validation by the DTD. > > If your DTD makes a heavy use of namespaces: > > * Use an XML editor other than XMLmind. > * OR automatically convert your DTD to W3C XML Schema or to RELAX NG. > Recommended tool: trang, > http://www.thaiopensource.com/relaxng/trang.html > > > > Thomas Dumm wrote: > > How can I prevent XMLmind from writing the DCMI namespace URI > > (xmlns:dc=http://purl.org/dc/elements/1.1/) in my dc-elements? > > What determines in XMLmind that DCMI namespace URI are inserted? > > > > If I open in Oxygen an xml-file that contains the DCMI > namespace URI > > in the dc-elements I get the error message: > > E [Xerces] Attribute "xmlns:dc" must be declared for element type > > "dc:contributor". > > > > I must admit, that I am a bit lost here. Should the dc-namespace be > > written in the dc-elements or not? > > If I generate an xml-file with Arbortext the DCMI namespace URI is > > *not* written in the dc-elements. > > > > In the dtd I have the root-element <Collection> with: > > > > <!ELEMENT Collection (MetaData?, (Digest | MetaFrame | > Facts | Feature > > )*)> <!ATTLIST Collection CollectionDescription CDATA > #FIXED "emnemics > > GreenCollection R2" > > CollectionRights CDATA #FIXED "(c) emnemics ag switzerland, > all rights > > on structure reserved, www.emnemics.ch" > > CollectionIdentifier CDATA #FIXED "02-gre-r2-nil0000" > > xmlns:dc CDATA #FIXED "http://purl.org/dc/elements/1.1/" > > xmlns:m CDATA #FIXED "http://www.w3.org/1998/Math/MathML"> > > > > A dc-elements are the defined by: > > > > <!ELEMENT dc:temporal (#PCDATA)> > > <!ATTLIST dc:temporal > > type (01 | 02 | 03 | 04 | > 05 | 06 | > > 07 | > > 08 | 09) #IMPLIED> > > > > > > So should the DCMI namespace URI be written in our > dc-Elements, or not? > > > > As we start to load files into our cms, I fear that these > minor(???) > > differences will show up an might cause problems. > > Thomas Dumm wrote: > > - If you say, that XXE does an *acceptable job* when all > namepaces and > > their prefixes are declared in the DTD as attributes with a fixed > > default value for all the possible root elements of a > document, do you > > mean by that: With the next release of XXE our documents > will (should) be saved as valid xml documents? > > xmleditor-support at xmlmind.com wrote: > > I don't know. It depends on your specific DTD. > > > > Current release uses method #1 to deal with DTDs making > use of namespaces. Next release will use method #2, which is > as flawed as method #1. Both methods work only for the > simplest cases. Maybe method #2 works with *more* simple > cases than method #1. That's why we'll make the change. > > > > Method #2 at work: > > > > --> The following document: > > --- > > <!DOCTYPE doc SYSTEM "dtd1.dtd"> > > <doc> > > <p>...<p> > > <mml:math>...</mml:math> > > <foreign> > > <svg:svg xmlns:svg="http://www.w3.org/2000/svg">...</svg:svg> > > </foreign> > > </doc> > > --- > > > > where dtd1.dtd is: > > --- > > <!ELEMENT doc (p|mml:math|foreign)+> > > <!ATTLIST doc > > xmlns CDATA #FIXED "http://www.acme.com/ns" > > xmlns:mml CDATA #FIXED "http://www.w3.org/1998/Math/MathML" > >> > > > > <!ELEMENT p (#PCDATA)*> > > > > <!ELEMENT mml:math ...> > > > > <!ELEMENT foreign ANY> > > --- > > > > will be saved as: > > --- > > <!DOCTYPE doc SYSTEM "dtd1.dtd"> > > <doc xmlns="http://www.acme.com/ns" > > xmlns:mml="http://www.w3.org/1998/Math/MathML"> > > <p>...<p> > > <mml:math>...</mml:math> > > <foreign> > > <ns:svg xmlns:ns="http://www.w3.org/2000/svg">...</ns:svg> > > </foreign> > > </doc> > > --- > > > > Notice: > > [1] All the namespace prefix declarations found in the DTD > are repeated on the doc root element. > > [2] mml:math has no namespace prefix declarations. > > [3] The prefix of the svg element is "ns" and not "svg". > > > > According to dtd1.dtd (except for the foreign element: ANY > mean any *declared* element), the save file is valid. > > > > > > > > --> The following document: > > --- > > <!DOCTYPE doc SYSTEM "dtd2.dtd"> > > <doc> > > <p>...<p> > > <mml:math>...</mml:math> > > <foreign> > > <svg:svg xmlns:svg="http://www.w3.org/2000/svg">...</svg:svg> > > </foreign> > > </doc> > > --- > > > > where dtd2.dtd is: > > --- > > <!ELEMENT doc (p|mml:math|foreign)+> > > <!ATTLIST doc > > xmlns CDATA #FIXED "http://www.acme.com/ns" > >> > > > > <!ELEMENT p (#PCDATA)*> > > > > <!ELEMENT mml:math ...> > > <!ATTLIST > > xmlns:mml CDATA #FIXED "http://www.w3.org/1998/Math/MathML" > >> > > > > <!ELEMENT foreign ANY> > > --- > > > > will also be saved as: > > --- > > <!DOCTYPE doc SYSTEM "dtd2.dtd"> > > <doc xmlns="http://www.acme.com/ns" > > xmlns:mml="http://www.w3.org/1998/Math/MathML"> > > <p>...<p> > > <mml:math>...</mml:math> > > <foreign> > > <ns:svg xmlns:ns="http://www.w3.org/2000/svg">...</ns:svg> > > </foreign> > > </doc> > > --- > > > > The above document is well-formed, 100% interchangeable > with non-validating XML applications, but is not conforming > to dtd2.dtd: according to the DTD which treats xmlns > attributes as if they were normal attributes, doc cannot have > a xmlns:mml attribute. > > >

