Online XML document creation/editing?
OK, I'm sold on some of the hype for XML, scheemas etc. But what do I use to impliment it?
I can (in theory) design an XML format/name-space. Also design a DTD to define it's structure and validate it against. Create nodes that could hold the documents. Create XSL transforms (or just use CSS) to display the XML documents in a pretty manner. etc.
But, without re-inventing the wheel, what web-based tools are there that will allow XML data structures to be edited according to their DTD definitions etc. and validated before returning the new or edited XML. i.e. Something that will be user friendly so that to users it is just a data entry screen or document editor.
I am not expecting a ready made module. Just a pointer to non drupal (e.g. Java) solutions etc. would help.
I have seen, but not actually tried, the "XML Content" module. From what little I read it just applies XSL transforms and is not an editing and validation tool. In my case adding CSS entries for the XML properties will be adequate for display but it may come in hany some times.
Nearly everything XML related seems to be about displaying, importing, exporting existing XML content, and I don't just mean in regards Drupal here. There seems to be very little around by comparison related to actually creating XML data.
Regards
John Bryan
www.ALT2.com
Application Integration Specialists

XML Content Module
Hi John,
You're right, the XML Content module does not include a web-based XML-editor. It's main target is to hold XML (externally created or hand-edited) and transform it to HTML. XML well-formedness tests and schema validation is not hard and is planned for XML Content.
About web-based editors, did you check Bitflux? I'm not sure if it supports schema-based interface generation (they say on the site that it supports a small subset of the XML schema standard). Non-web editors ofcourse exist, and I use Jaxe, which takes a schema as input and creates an editing GUI accordingly.
I would be interested to know of ideas in this regard.
-Weam
Grok the hype
That's because that's what it's about. It's not supposed to be a panecea for editing by hand (or wysiwyg or equivalent). XML is best suited for communication between disparate systems. It's a transport layer.
It's not suitable as a directly editable format. Or even as an internal data structure.
Computers write XML (like RSS). Computers read XML. Humans shouldn't have to unless debugging.
I've tried a bunch of XML-assisting UIs - XML Notepad, XMLSpy (ug), Eclipse, Cooktop (good for XSL) and none of them are great. A Web-based version would suk worse.
I know, I wrote one in javascript back in 1996 (netscape 3, a VRML scene graph editor ... actually turned out better than the editors listed above ... but I digress)
PNG is a great file format. Lots of developers now use it to export their graphic files, for portability and extensibility reasons.
But you are not expected to open the bytecode and play with it, nor are you expected to use it as a native format when writing a graphics package.
SVG, well, that's another story ;-)
The same goes for XML. Develop an interface that presents and edits your data in the most appropriate way possible ... then provide the option to serialize it as XML. hide the implimentation.
A DTD is not a UI. A UI can possibly be derived from a DTD but that's not the same as 'editing XML'.
I actually sympathise with what you are wanting to do, but you may have bitten the wrong end of the XML stick.
I dunno what I'm talking about really, I hate WYSIWYGs and ALWAYS write all my HTML by hand. Am I a hypocrite?
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
Some examples of editable XML (via an interface)
8¬)
Effectively the XML is edited by specific single format editors that have the equivelant of the DTD/Schema built into them. And like what I am looking for, the user does not need to understand what the XML format is because that part is handle by the GUI or WYSIWYG-editor.
XML Schema mechanism is specifically designed not just for transfering data, but also so that different systems can create or manipulate it without explicit hard-coded programming, hence the existence of DTDs etc. XSL is designed to import/export a particullar XML format with a system that can not natively handle it, but Drupal can display and format XML by treating it as xHTML and use of CSS. Drupal currently only has a raw text editor and specific hardcoded HTML GUI editor modules.
Generic XML editors do exist as local client solutions and technically, especially with PHP5, are feasible online. It is just that they are very few and none exist as modules. One of the reasons I suspect is that most people creating XML formats are very much commercial and want to restrict the ability to edit orjust do not beleive in open-source as part of their business practise.
But a generic XML content editor (not a XML code editor) would in many ways be greatly better than flexi-node or CCK. Benefits would include:-
It seems strange to me that none of the CMS systems I have seen are very "XML" in their node/article body format and editing, just seems the obvious way to go for web based forms and records etc.
Regards
John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31
Good list of XML
Good list of XML benefits.
John how do you find the idea of an XML|XSLT filter in the "XML Content" module? In fact it seemed strange to me too that popular CMS's don't support XML natively. But I found that it is easy to implement in Drupal, given its modularity. With validation coming into "XML Content" (a couple of days), I think it would fulfill much XML expectation, except the WYSIWYG ofcourse. The node body remains in XML, and available for any data extraction via, for example, SimpleXML of PHP5.
I appreciate any suggestions / feedback.
-Weam
Will contact you direct
But will be busy tomorrow. If I can suggest not releasing any new other than as experimental for a couple of days, it sound like it would be very worthwhile to put our heads together.
In the mean time:-
Some key goals though should be:-
As well as editing, it should make import and display of XML data easier such as supplier product data, price lists etc. Also a companion module to split/re-combine XML data dynamically into sub nodes might be a powerful subsequent feature, but that would need deep Drupal understanding.
Regards
John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31
Key goals already there
Validation is two-fold:
About the goals:
Regarding import and export, I used to write custom code to do the import, and I know it's worth it. But it is a bit complex because it depends on where you are getting the XML data (filesystem, a repository, website, etc), so it better be within a general import/export solution (maybe the import/export api).
About splitting XML data to subnodes, I would say this is an advanced idea, but it is a little strange. You will have a node split into subnodes, which doesn't go a lot with the drupal way to do things. However I have some ideas regarding integration of XML Content with other popular drupal modules, which have not matured yet in my head.
Re: Splitting XML into sub nodes
Yes, that is advanced for the stage we are talking about at the moment and is very much looking ahead. But just one example is loading a supplier XML feed into a "Goods" node which automatically extract and creates a "Goods Item" node for each goods object in the XML data. Or instead by type of XML sub-record such as for each "Goods Item" create nodes for "Item Description", "Item Specification", "Product Image Gallery" etc.
I am not sure how beneficial this would be or if it would be a completely wrong approach. Just something that was in my head at the time.
Regards
John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31
XML Schema Validation
XML Schema validation is now implemented. Check the XML Content project description.
Regards,
-Weam
I know what you are aiming at, but...
If you call MS EXCEL an XML editor, we are talking different languages. :-)
You can get an HTML editor, you can get an RSS, SVG, OOML, XXXML editor etc that will do a good job of inputting and outputting XML, hopefully round-tripping it. Each one of those is domain/dialect specific, like you say, a single format editor, and is NOT a generic XML editor.
I would contend that unless you were able to place a comment or a mixed doctype into an 'XML' document you fed into OpenOffice or MS Word and get the same thing back out again after editing, you do not have an XML editor - you have an application that reads/writes a dialect of XML.
There's a diff.
I see where you are going with the idea that a schema/DTD could provide enough information to create a custom editing UI. It's sorta true, but all examples I've seen end up complex, and are like some wierd IDE to use, with autocomplete everywhere or subtle restrictions and clunky interface. Multiplying that by web scripting is horrid to imagine.
I DO like where you are going imagining XML as a step beyond CCK. I've done drupal XSL transform filters etc a lot myself. The benefits you list are mostly valid.
But I think you're going to have to limit yourself to a dialect, not try to solve the 'any XML document ever' problem.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
Some of the buts...
Re: If you call MS EXCEL an XML editor, we are talking different languages.
MS Office documents file formats are XML based these days http://office.microsoft.com/en-gb/products/HA102058001033.aspx 8¬)>
Re: Each one of those is domain/dialect specific, like you say, a single format editor, and is NOT a generic XML editor. and you do not have an XML editor - you have an application that reads/writes a dialect of XML.
Wasn't suggesting otherwise for these. I was responding to the comment of XML of "It's not suitable as a directly editable format." as just some example of directly edited XML uses/applications. 8¬)
Re: But I think you're going to have to limit yourself to a dialect, not try to solve the 'any XML document ever' problem.
I agree very much about not trying to solve 'any XML document ever' 8¬) but do not see that there is any need to artificially restrict to one dialect. Although most of what I personally want to achieve could be done with standard XML name space and custom DTDs.
Also from what I have seen so far I agree with your "clunky interfaces" & "weird IDE" comments about much of what is out there. But I think this is due to various factors such as the former often being written be serious techies for use by techies, and the later sometimes either to justify the price of commercial products or because someone thinks GUI is better but don't have the development resource to develop it properly.
Unlike other tools I don't want six layers of esoteric validation with gooblygook output and don't want it to create & control every aspect such as data definition, styling, transformation & layout etc. (e.g. "eWebEditPro" goes overboard on this) .I want something that will apply XML technologies that are already there in as simple a way as possible. Additional layers of facility may be added but it would not be used to design DTDs/Schema/CSS etc., it would instead apply them.
In the case of creating a document according to DTD criteria - this will not be straight forward and could easily be clunky, but it does not have to be clunky. Taken step by step and with modular design, I see no reason for this not to be achievable. Especially if at all stages the node body content is kept as valid XML (of which ever dialect) with no introduced module specific content, as this will make for excellent forward/backward compatability during development 7 life-cyle and allow modular development.
Of course no point you liking where I'm going if no one does anything about it 8¬( so I best stop moaning and think about doing... So just how do you spell this Drupol thingy again?
Regards
John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31
XML Editors for XML Content
I've been writing documentation for software products in SGML and XML for the last 12 years, so it seems a little odd that no one knows about good XML Editors. There are, in fact, a few well-known XML Editors that allow you to use arbitrary DTDs or Schemas, provide something close to WSYSIWYG editing and are used by writers (not developers) every day.
They just aren't open-source or cheap. The three best known are FrameMaker 7+, XMetal, and Epic (also known as Arbortext Editor now owned by PTC). FrameMaker is probably the cheapest, but also sort of the most awkward to use as it is not a native XML Editor. You are working in Frame and the output simply gets saved as XML. XMetal and Epic are native XML Editors, but also have their drawbacks.
There are also several CMS vendors who support XML, although I'm not personally familiar with names. But again, they are not open source and they are not cheap.
And in reply to the person who said that XML is not for authoring content, let me rant a little with some history. Because nothing could be farther from the truth.
The entire idea of XML was based on SGML which is an ISO standard (from 1986) that was developed by the publishing industry specifically to mark up and process documents meant for people to read (i.e., for content). SGML, in fact, was largely based on GML (generalized markup language) from IBM which they used to produce their product documentation in the '70s.
The fact that it is also useful as an intermediate format for data is great -- but it was not the original point.
weeellll...
Yeah, I said:
XML is based on SGML. SGML is based on ASCII. ASCII is based on Binary. They are different stages of evolution. Quoting SGMLs birthdate to age XML is misleading. By the time XML hit the scene, we already had IDEs, editors that were better than greenscreen terminals, syntax checkers and a lot of UI tools. Almost anything that writes XML does so as a serialization of the data structure it holds internally. The map is not the territory.
With respect to your history, I still don't think the primary purpose ("original point") of XML is to be editable by humans. Human-Readability was indeed built into the early mission, but portable and machine-readable came above human-writable. ... as I understand the original point. sorry, no citation to the original discussion list, it's a maze of twisty passages :-B
How many of the XML docs produced, even at the earliest stages, were/are edited directly? vs those that were generated programatically? A vanishingly small percentage!
It's a very very good serialization and transport layer. A decent semantic and structural model also. But it's best used and edited by humans only with a UI abstraction layer over top of it, not by hand-editing the file.
I don't think I'm really that far from the truth :-}
Only ASCII Editors, Hex editors, and a few archaic image editors worked directly on the file format itself. Every other editor is some level of abstraction away from the underlying format.
Any non-trivial XML 'editor' is not editing XML itself, but a higher level view of the data structure and just reads and writes XML as closely as possible. Maybe a DOM editor. I maintain that there is a difference between a DOM editor and an XML editor - although I concede that this is being quite pedantic.
I'd like to try out those editors you describe as being decent. Maybe they will even be good enough to convince me that raw XML code as a primary representation makes more sense than a context-specific data UI. I've imagined before now that it's possible with some supreme DTD and UI tricks.
Do you think that any of those suites could be helpful as the browser-based front end editor this discussion is looking for? It's intriguing, but scary.
Anyway, just as I don't (often) choose to go bit-toggling to edit my images, I'd rather leave XML-encoding to the machine, and work at a higher level - even if that higher level is just the DOM.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
Semantics 8¬)
Re:
Very true. The same is even more true for traditional and current MS Word document formats, the old WordStar & SuperWriter document formats or many other document formats.
A better comparison might be programming languages where normally a user just sees the end result i.e. the actuall displayed screens when the software runs. The programmers still need to be able to read the programming code, or they wouldn't be able to write or maintain the software. As opposed to Assembly Code, C, COBOL etc. some programming languages are designed to be easier for humans to read the normally behind the scenes code e.g. BASIC, PASCAL etc.
Whether "human readability" was a primary or secondary point is not exactly relevant to topics such as having a generic online XML editor and display system rather than a specific client-based editor such as OpenOffice.
Another comparison for those who have used desktop databases - I don't just want to see the formated end result of seeing the data displayed through forms and reports (such as via a compiled Access runtime or executable programe); I also want to be able to edit the data tables (such as using the full version of MS Access).
In XML terms - I don't just want to be able to see the result of the XML after it has been transformed by XSLT and formatted by CSS; But neither do I want to edit the source XML directly, that can already be done. Instead I want to be able to edit the under lying data (with a "level of abstraction") using the DTDs and Schemas to control when "Add Element", "Add Attribute" etc. are allowed.
Taken further, Scheema information should allow completely automated generation of GUI form or tree like editing screens showing records (elements and attributes) with fields (sub-elements) and dynamic "Create new <Element Name>" buttons.
Summary - I am looking for an online tool to edit or create valid data (not directly the XML encoding itself) as defined by the data format (the scheema and/or DTD).
Regards
John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31
A list of XML editors
Found this so I though I'd post it for anyone else interested...
http://www.xml-dev.com/xml/editors.html
Regards
John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31
re: Online XML document creation/editing
Does anybody know about any updates in this subject area? Our particular interest is to use drupal as a CMS for creating/editing DITA documents, and then some kind of module that runs the DITA toolkit on them and creates a separate set of nodes intended as html pages for the end-user.
Generic solution should fit
Although they don't exist yet 8¬(
There is http://drupal.org/project/xmlcontent for DTD validation and applying transforms but not an online editor AFAIK (I have not played with it yet so my comments are supposition based on half information).
I will probably be developing a module, which should be compatible with XMLCONTENT (or any other XML compliant module) to generate dynamically created nodes from subsets of an existing XML node. These virtually nodes should be possible from what I have been learning thanks to the Pro Drupal Developers book 8¬)
What there seems to be no signs of, but quite feasible? Is a java (or similar) editor module that can edit (according to DTD or Scheme specifications) the contents of XML data.
But the point is, if XML manipulation tools are developed then your DITA requirement should be solved as it is an XML standard. There may be a few DITA specific bells and whistles that be nice to add as additional modules on top. But generic XML tools would have more developers, users & suporters therefore would be a sounder core engine to impliment DITA or another specific XML flavour.
So the question is.. who is going to make a starts on the Java editor? - Don't look at me, I don't know any Java ;¬)
Regards
John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31
re: Generic solution should fit
Thanks for the reply. I agree as soon as an XML editing module is developed that does DTD validation we'd probably be mostly set. It is surprising that there isn't one, using java or otherwise.
I don't think XMLCONTENT does what we want since the DITA transformation isn't just an XSL transform, but for taking the xml and making end-user nodes out of it via the DITA toolkit I don't think it would be difficult to do using a cron task. If there was a need to immediately publish on demand, then that wouldn't work. One step at a time...
Is feedapi for this
Is feedapi for this sufficient: www.drupal.org/project/feedapi ?
greetings,
Martijn
Drupal 5.7 -> PDF via XML?
I have an idea, and I think it is possible with Drupal 5.7 and the XML Content module, but I am not sure and I don't want to race down a rabbit-hole if my quest is doomed.
I want to have multiple users contributing material to a Book with numerous Child Pages, store all the content as XML, and permit the users to view a formatted version of the draft in progress with a tool like the PDFView module. It is important that the formatted view support three master pages with various 2-column layouts.
THEN at the end of their messing about with the text, I want to take the same XML and import it into InDesign or FrameMaker (assuming good DTDs/EDDs etc on that end).
So Drupal 5.7 would maintain the content in the Book module, and XML Content would ensure valid XML, but somehow I need to get the XML content and transform it into formatted PDF, INDD, and FM output. That is the "miracle happens here" part. Is it a miracle, or can it be done with Drupal 5.7?
Thanks for any guidance!