xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shane nuessler <shane.nuess...@anu.edu.au>
Subject Re: dtd expansion
Date Wed, 06 Aug 2003 07:58:13 GMT

Hi Murray,

I'm sure your advice is correct, but I just can't get it to ignore the 
comments. We;ve even gone back to Xindice 1.0 now because we couldn't 
get the methods working with 1.1 for RPC calls via Perl and VB. I'm 
really stuck, but will keep fighting it tomorrow I think.

Shane.

Murray Altheim wrote:

> [cc: Thierry Michel]
>
> Murray Altheim wrote:
>
>> shane nuessler wrote:
>>
>>> Hi Kevin, Murry.
>>>
>>> Thankyou very much for your help.
>>>
>>> We are currently trying to store SMIL files for a project we are 
>>> undertaking at the moment. The SMIL file has the DTD specified at 
>>> the top to declare that SMIL version 2 is being used. But when we 
>>> store and then retrieve the document, the comments of the DTD are 
>>> included in the retrieved SMIL file, it really knocks RealOne player 
>>> about! We just need the SMIL file out, the same as it went in.
>>
>
> Shane,
>
> Well, I thought I'd take a look at the SMIL 2.0 DTD since I know one
> or two guys on that working group and was curious -- a bit flattered
> in that they modularized it in a similar way to the way I did XHTML,
> right down to the modules and comment style, etc.
>
> Anyway, I normalized the modules to one DTD file using James Clark's
> spam, ending up with a 68K file. This included expanding all marked
> sections and removing their delimiter syntax. Then I manually removed
> all the excess whitespace and comments, save the first one (since one
> must leave the copyright notice). The result is about 38K.
>
> Note that there is no issue (so far as I know) in modifying or
> redistributing the SMIL DTD so long as the copyright notices are
> maintained, and the file is not misrepresented. This version should
> be functionally identical to the SMIL 2.0 DTD, though it is provided
> to you with no expressed or implied warrantee. Don't redistribute
> the DTD without that initial comment.
>
> I've attached the file as a zip, since perhaps others can use this.
> If the zip doesn't come through the listserver, send me a message
> and I'll forward a copy privately (this goes for anyone else as well).
>
> Murray
>
>>> We downloaded the CVS of Xindice (1.1b2) which I believe uses Xerces.
>>>
>>> Murray Altheim from the Knowledge Media Institute suggested-
>>> make a JAXP call:
>>>   javax.xml.parsers.DocumentBuilderFactory.setIgnoringCommments(false);
>>>
>>> Which we will try (Murry, i'm not sure which file though, since I've 
>>> never programmed in Java!)
>>> (I think it is 
>>> xml-xindice/java/src/org/apache/xindice/xml/jaxp/DocumentBuilderImpl.java 
>>> ?)
>>
>>
>> Well, I'm not entirely sure, but in the Xindice code there's only two
>> places where you find DocumentBuilderFactory.newInstance(), which is
>> where you create a new factory from which you get a new DocumentBuilder
>> (which is the actual XML processor).
>>
>> The first is in 
>> org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java,
>> the second in org/apache/xindice/core/Database.java. Since it sounds 
>> like
>> it's your client that is having the problem, I'd suggest the former.
>> Where you see the line
>>
>>    dbf.setNamespaceAware(true);
>>
>> you'd add:
>>
>>    dbf.setIgnoringComments(true);
>>
>> and I *think* that should do the trick. If not, try Database.java. 
>> There's
>> no reason to keep the comments AFAIK. I think I figured this one out a
>> year or so ago when digging in the Xerces code to see what was 
>> happening;
>> I had the same problem as you.
>>
>> The stupid approach I suggested previously would also work: remove all
>> the comments from the SMIL DTD and you solve this problem without having
>> to muck with Xindice code. But this is probably a problem that needs
>> solving anyway.
>>
>> Murray
>
>
> ........................................................................... 
>
> Murray Altheim                         
> http://kmi.open.ac.uk/people/murray/
> Knowledge Media Institute
> The Open University, Milton Keynes, Bucks, MK7 6AA, 
> UK                    .
>
>    "Shhh. Be vewy, vewy quiet. We're hunting wabbits." -- Elmer Fudd
>
>    "I don't know how close we are, closer than we were yesterday,
>     I guess. All I know is we're on the hunt." -- George W. Bush
>     BBC News: http://news.bbc.co.uk/1/hi/world/americas/3110615.stm



Mime
View raw message