One more API response proposal

1 view
Skip to first unread message

Ross Singer

unread,
Jul 22, 2008, 10:29:58 AM7/22/08
to jangle-...@googlegroups.com
Not sure I'm waiting until _after_ the first draft of the article is
in for all these ideas, but, here goes.

This one may appeal to Richard, et. al.

I think it would be a good idea to also have an optional 'stylesheet'
field - a URI to an xsl file, for example, to allow the Jangle core to
turn, say, MARCXML into DC. This would have to be at the 'data' or
'entry' level (since collections can have multiple varieties of
entities they're transporting).

There are, of course, several advantages to this -- it lowers the
amount of code in a given connector; it encourages the reuse of
stylesheets (which would provide some semblance of data normalization)
among implementations; it could promote some Jangle "uber-documents"
that include all the data that's available to be transformed into
other formats.

In general, the moment somebody mentions XSLT, I tend to break out in
violent allergic reactions and immediately need a lie-down and perhaps
a stiff drink. In this case, however, I think it's probably the
smartest way to go.

Thoughts?
-Ross.

Richard Wallis

unread,
Jul 22, 2008, 11:42:09 AM7/22/08
to jangle-...@googlegroups.com
You are quite right this one does appeal to me, but I am not on my - own this particular one has been implemented by Amazon, not to mention the Talis Platform & Talis Keystone.  This an easy one to do, and drops in to the "if you don't like it don't use it" category which tend to not cause too much argument.
 
What you do need also is it's partner optional field 'content-type' which sets the content type in the response.  If you don't have this you end up producing a xslt transform in to a format that your client refuses to consume because the content type is set wrong.
 
Don't worry Ross  xslt are like those stiff drinks you mention - once you have laid a few down it gets easier and more fun ;-)
 
~Richard.
 
 


From: jangle-...@googlegroups.com on behalf of Ross Singer
Sent: Tue 22/07/2008 15:29
To: jangle-...@googlegroups.com
Subject: [jangle-discuss] One more API response proposal

Ross Singer

unread,
Jul 22, 2008, 11:56:11 AM7/22/08
to jangle-...@googlegroups.com
Content-type already exists, anyway, so you'd just be, say, sending
"text/html" if your entry:content had marcxml, but you were sending
the MARC to HTML stylesheet, right?

In most library cases, this will be a non-issue, of course, since we
mostly only have application/xml.

-Ross.

Reply all
Reply to author
Forward
0 new messages