Fog Creek Software
Discussion Board




XSLT Mapper?

Can anyone recommend a half-decent XSLT mapper? Something where you can open two schemas and drag n' drop nodes back and forth to get a running start before diving into the text?

Altova's (the XMLSpy folks) Mapforce doesn't "do" mixed content nodes, which translates to: if a mapped node on either side isn't marked "simple" then it refuses to play.

Philo

Philo
Saturday, May 29, 2004

Huh?

Jason
Saturday, May 29, 2004

http://www.tibco.com/software/business_integration/xmltransform.jsp
- was good, sort of.

Can't you export the xslt from your very own Biztalk?

Michael Moser
Sunday, May 30, 2004

Last time I worked with BizTalk, this was possible. With something called "Data Mapper" or something similar, IIRC.

Jilles Oldenbeuving
Sunday, May 30, 2004

For Jason, who I'm guessing got confused at the "mixed content" bit...

XML allows what are called "mixed content" nodes - nodes that contain both text and other nodes:
<parent>
  Some data
      <child>More Data</child>
      <child>Other Data</child>
</parent>

It's discouraged, especially in xml used for data storage, but it's allowed. However, it seems that *dealing* with mixed content nodes isn't trivial, based on the number of applications I've found that don't support them.

There are two problems with this short-sightedness:
1) HTML. HTML is generally mixed content:
<body>
  Four score and <i>twenty</i> years ago, <b>our forefathers</b> brought forth...
</body>

2) "Either/or" nodes:
<Name>Philo</Name>
  -or-
<Name>
    <first>Philo</first>
    <middle>T</middle>
    <last>Farnsworth</last>
</Name>

Now as a developer you may not like them, and would never use them, but the reality is that you don't always get to define the schema. And when you have to deal with a foreign schema, you take what you get and make it work.

So I'm trying to map an output schema to an industry standard schema - Altova's MapForce won't even let me map to a node unless it's marked "simple". In XML, nodes are "simple" or "complex." "Simple" nodes only have attributes and text; "Complex" nodes can have other nodes. In Altova's MapForce, if you try to map a value to a node that isn't marked "simple" (no matter if the schema indicates it has child nodes or not), it throws an error. Period. End of discussion. And since it's not my schema, I can't just redefine it to make the application happy.

I've been toying with Stylus Studio ( http://www.stylusstudio.com ) and it seems to be pretty nice - it's definitely more flexible. I'll take a look at the Tibco package, too.

As for "why not use Biztalk?" - I don't have a local installation handy, and installing it to use it as an XSLT mapper is a bit like building a workshop to cut a piece of wood. :-)

Philo

Philo
Sunday, May 30, 2004

Mixed-content nodes are also necessary for using XML as a reasonable word processing format, i.e. DocBook.

If you try to use XML for word processing while avoiding mixed-content nodes, you get unreadable monstrosities like WordML...

Chris Nahr
Sunday, May 30, 2004


I was at an Altova presentation last summer about the latest XMLSpy & Mapforce and it's "wonderful" integration with MS IDE, etc.

I've been using XMLSpy for about 3 years and I've found it to be getting progressively worse if you're not in an entirely MS environment.


Philo, check out http://www.aspectxml.org/ It's using some of the Aspect Oriented Programming (AOP) techniques to weave together XML Schemas using OSS tools.  It might be right up your alley.

(I'm one of the founding contributors, so I'm a bit biased.)

KC
Sunday, May 30, 2004

It's been my experience that every xsl mapper that I have tried rolls around in dead fish and barks at the moon when you are trying to do anything more difficult then connect on set of simple elements and attributes to another set of simple elements and attributes. BTW writing xsl has been about 75% of what I have been doing over the last month so I actively hunted for something to speed me up.  Mapforce by altova wouldn't run for more then 10 minutes and couldn't recover a project, even if you had just saved it.  Tibco's product has promise but it keeps guessing what I want to do.  Frequently its guess is wrong.  Biztalk keeps putting stuff in that only biztalk can do instead of just giving me straight xsl.

The state of graphical xsl mapping today reminds me of the early WYSIWYG HTML editors.  If you are doing someting simple and can go into code and fix the errors after you are done they might buy you some time.  If you know what you are doing or are doing anything even a little complex you will find yourself gnashing your teeth and wailing into the outer darkness.

Good luck

K
Sunday, May 30, 2004

I ended up staying with Stylus Studio because it did *exactly* what I wanted - let me pull in two schema, connect a bunch of nodes to give me a jumping-off point, then got out of my way to let me muck about in the markup itself - it gives decent color coding and intellisense, and of course lets me run the transform against an XML file to see how I'm doing.

I'm pretty happy with it. :)

Philo

Philo
Sunday, May 30, 2004

*  Recent Topics

*  Fog Creek Home