Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Jaxe and DTD support

Help
2012-06-12
2013-05-01
  • Benoit Mercier
    Benoit Mercier
    2012-06-12

    Hi Damien,

    You said 8 years ago that  «There is no way to use a DTD instead of a schema » with Jaxe (https://sourceforge.net/projects/jaxe/forums/forum/184274/topic/1082656?message=2589563) .  Is it still true today?  I mean, if I was able to create a class that implements jaxe.InterfaceSchema, would it be possible?  Do you see any major architectural problems preventing such an addition.  I would be ready to do it.  French is my native language so I have no problem to understand your code and comments ;-)

    I have more than 60000 documents that took us 10 years to write, based on an good old DTD.  We developped several tools that rely on this DTD and the XML editor that we started to use around 2001 is no more an option today.  So I would like to embed JaxeApplet in our internal editorial web platform.  We will have to migrate to Schema in the coming years, but right now, I really would like to work with Jaxe that appears to me as the best open-source foundation available today to reach that goal.

    Thank you very much in advance for your guidelines!

    Best regards,

    Benoit

     
  • I'm surprised there are still people using DTDs. I guess they were not dead yet… probably thanks to the complexity of the schemas.  :-)
    Jaxe is still not able to use DTDs. However, InterfaceSchema was created just to allow the implementation for different schemas, and it could probably be used with DTDs.
    There is one problem, though : it's using org.w3c.dom.Element to reference element definitions in the schema. You could probably work around that by creating fake elements for each element defined in the DTD, but I already regret not using a custom interface instead of org.w3c.dom.Element. The same problem occurs for jaxe.wxs.JaxeWXS, because the schema is loaded into memory and it would be better to completely discard element references from the schema document. Instead I keep the schema document element references, and I use a hashmap to link them to the jaxe.wxs schema objects. On the other hand, if we used an interface for elements references, another wrapping would be necessary for the other schema implementations.

    I could add you to the developers if you wish to contribute.

     
  • Benoit Mercier
    Benoit Mercier
    2012-06-12

    Thank you for your quick reply.  You confirm to me that DTD support for Jaxe is not so far away.  And yes DTD is unfortunately still used in our project, but no XML editor « for WordPerfect users »  supporting schema was available around 2002 (I guess, I was not involved at that time).  And nobody wanted to perform major refactoring few years later, not to mention the training of more than 20 people to use a new editor ;-)  So here I am: I will definitively try to add DTD support to Jaxe… before migrating my documents to schema, let's say, in the coming years!!!

    I will contact you this summer.

    Thanks again,

    Benoit