OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

topicmaps-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [topicmaps-comment] resourceData toher than #PCDATA ?


Stefan Lischke wrote:
> Hi there,
> 
> I'm working with XTM in a Web-ContentManagementSystem and i cannot divide
> the data from the view for 100%.
> That means, that i have to put some XHTML-Tags inside the topic's
> resourceData.
> 
> But the XTM Specification says:
> ----
> Content Model
>   <!ELEMENT resourceData  ( #PCDATA ) >
> The <resourceData> element is declared #PCDATA, meaning that it may only
> contain character data.
> ----
> 
> Is the only way of working with other tags like XHTML, to "include" them
> by referencing like:
> 
> <resourceRef xlink:href="xmldb://localhost:8080/db/data.xml"/>

Yes.

> Or is there another way to insert Tags without violating the specification?

XTM was designed explicitly to disallow you putting non-XTM markup
inside the <topicMap> element, so that we could guarantee interchange
of XTM content. If you allow XHTML, you probably should allow MathML
and SVG and.. and pretty soon, well immediately, you've lost any
sort of real interchangeability. I don't buy for a minute the arguments
made in 1999 by Dan Connolly and others that you could "just ignore"
the content you didn't understand. Gah. That would mean that the "user
experience" (i.e, behaviour) of a Topic Map would differ depending
on which tool processed it -- not a good thing.

BUT. But, there's a way to deal with this and keep the content
within the same XML document. The XTM spec does not force you
to make the <topicMap> element the document element, so you
could create a composite document type by including one or more
<html> and one or more <topicMap> elements within a wrapper
document element. Since I'm author of the modular XHTML DTDs I've
thought many times about creating this document type (DTD), but
it's mostly been time that's kept me from it.

One thing of note is that the composite document (let's call it
<wrapper> for now) has one ID namespace, i.e., all the IDs within
the XTM content must be not only unique within <topicMap>, but
within <wrapper> as well. Same is true for <html> IDs. That's
actually a good thing, since it's then easy to have the XTM link
to the XHTML and vice versa. So rather than embedding XHTML within
<resourceData>, you use a <resourceRef> to point to an XHTML
element outside of <topicMap> but within the <wrapper>.  And
from a processing standpoint, it's pretty easy too:  say you're
using the DOM, you can then grab the XHTML element via its ID
as referenced from <resourceRef>.

Hope this was clear,

Murray

......................................................................
Murray Altheim                    http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK               .

   Monkeys use thoughts to control robotic arm
     http://www.sfgate.com/cgi-bin/article.cgi?file=/c/a/2003/10/13/MN2018.DTL
   Bush uses media expertly to push apocalyptic view
     http://truthout.org/docs_03/091403J.shtml



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]