views:

113

answers:

1

I'm working on a system that stores data in XML files. The data in the files can be converted into a generic DOM but not without some processing. I have been tasking with looking into how to do the web access story for this system. (FWIW, the existing code base is in .NET)

The system can be thought of as an XML in XML database for handling generally static but end-user-time defined XML schemes. I'm not sure what the model is exactly as that's another guy's job but the bit I'm working with will be seeing serializable DOM objects of some kind.

The intended model is that the end user will write a web front end that accesses data from our system. The things that jump out at me as options are:

  • Build a SOAP (or equivalent) service that can present the processed XML and let the web server run from that with XSL or whatever.
  • Same as the SOAP solution but with server side XSL for security and rendering so the web server needs only drop in the text.
  • Build an assembly to so a web server can process files in process.
  • ???

We would like the system to be simple and cross platform (something that can be uses from a presentation layer written using LAMP, WAMP, RoR, ASP, etc).

A: 

It sounds to me like you're either not asking the right questions, or you're using the wrong terminology (or both.) But maybe that's just me.

"generic DOM" -- any XML file should be convertable into a DOM; if it can't be, it's not well-formed XML. The DOM is simply an in-memory representation of the XML. (Commonly, it's used to mean the DOM inside of a Web browser; but DOM models can be and are created on the server as well.)

Cross-platform -- I don't know of any way to write presentation code that can be plugged into LAMP, WAMP, RoR, ASP, etc. Maybe this is possible, but it seems unlikely to me.

My best guess about what you need is that it's pretty simple: Associate the XML file with a CSS Style Sheet, and let the Web browser format the XML for display to the user.

If that's not the answer you're looking for, maybe you could start with a sample of the XML that you need to display, and a prototype that shows how you'd like it to be displayed?

Dan Breslau
The on disk file is Valid XML, it's just not in a form that the end user will be willing to play with. After processing, you get a much cleaner DOM that is reasonable to work with.
BCS
I explicitly DON'T want my code serving up content directly to the web. I want some sort of web presentation player processing it first. As to the sample/prototype bit, I need a general solution as the end user will be defining the bulk of the XML schema.
BCS
But what does the end user do in "playing with" or "working with" the XML? Is it just for display in a browser, or does the user want to process the file with some additional business logic? What is the difference between the "unclean" and "clean" DOM formats that you're referring to?
Dan Breslau
As to what the user does: "whatever they want" although I suspect that XSL applied at the right spot would cover most of it. As to the clean/unclean thing: lots of annotations and whatnot.
BCS
@ 2nd comment ("I need a general solution...") Do you mean that the end-user presents you with an arbitrary XSD *at runtime*, and you need to serve up XML to match? That sounds like it would require semantic processing; I couldn't say what a generic solution would even look like.Please refine the question as much as you can.
Dan Breslau
I don't need to map pre-existing data to later provided XSD. Clients will define schema and then data entered and accessed only based on that schema.
BCS