[relaxng-user] association of RELAX NG with a document
David Tolpin
dvd at davidashen.net
Fri Oct 24 12:18:42 ICT 2003
> The user might *want* changing the map to cause changes in association.
But this should be done in such a way that all changes in associations for
already associated documents are explicit and obvious. Without that, and with
rules with complex inference, the consequences are not always desirable.
I am talking from experience. At the time of RenderX, we had a client who complained
about a bug in XEP (an XSL FO formatter) being unable to format a document and giving
weird diagnostic messages (and our support people having no idea where this diagnostics
comes from). I asked about their system, and indeed they had a CMS that associated
documents and stylesheets based on complex rules stored in a database, and indeed the
database administrator has changed the records in such a way that a chain of transformation
had changed.
The result was a user complaining of a tool that failed to format a documents 'when more figures
are added' (which was just a coincidence).
>
> > Providing a rule in the file that associates the document's URI with a resource does not
> > help either.
>
> It's not perfect, but it certainly helps.
It certainly helps, I'm sorry for the wording; I meant it didn't help to avoid the trap
just described.
> That is a problem. The real solution is to be able to attach metadata to
> the file without changing the content; unfortunately filesystems
> typically can't do that. On the other hand, WebDAV can; you could have
> a new rule type that specified a WebDAV property that contains the URI
> of the schema for a document.
Yes. But WebDAV is too much for many cases.
> > Thus, for me the only reasonable choice is still to use the DOCTYPE declaration for all
> > associations
>
> If you want to use DOCTYPEs, the nXML method can accomodate you (by
> doctypePublicId rules). However, I find the problems of using DOCTYPEs
> worse by far than the problem of associations disappearing on a rename.
> And even with DOCTYPEs, you can still get problem of the association
> changing; you still have to associate your DOCTYPEs with schemas. If
> you force me to put something in the instance, I would much prefer a
> processing instruction.
>
Well, you are right. I mentioned DOCTYPE but actually wanted something like a processing-instruction
with something like a public identifier as the target.
> There's no single right way to do the association. Different users will
> legitimately prefer different approaches. A solution needs to be
> flexible enough to accomodate them.
But my concern is that that particular flexibility bears problems which are more scalable
than the solution. That is, when the system is getting bigger, the problems outweigh the benefits.
I realize that I can be wrong.
David Tolpin
More information about the relaxng-user
mailing list