cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <je...@media.demon.co.uk>
Subject Controlling the Parser?
Date Mon, 04 Feb 2002 20:46:11 GMT
Dear All,

Here is a question for those of you expert in DocTypes, Entities, DTDs and
the way the Parser handles them.

Please bear with me while I explain the background.

I am working on the code that will allow the scheme for file manipulation
that was being discussed on this list a few months ago.

Consider a pipeline that works like this:

(Xinclude could be replaced by aggregation)

1. Generate XML the from Form Fields (which can contain XML)
		(RequestParsingGenerator, parses XML in Form Fields, not completed yet)
2. XSLT prepares tags for XInclude
3. XInclude the xml file that you want to modify (called the target below).
4. XSLT Transforms the target, according to the form data.
5. Serialise the target back to xml file.
		(FileWritingTransformer, reacts to special tag, not completed yet)
6. XSLT Transforms stream to provide response to user
7. Serialise the response to the user.


I realised the other day that I had a problem with this scheme, and this is
what I need help sorting out.

When the XInclude step (or aggregation) takes place, it is normal(?) for
the parser to expand Entities and add default attributes from the DTD to
the stream.

I use this to great effect in my projects, but I do not want it to happen
under these circumstances.

For instance, the author of the XML can write just this: <auth
xl:to="john"/> to link to the author's page, nice and simple ;)

When this file gets parsed, this tag gets filled in like this:

	<auth role="author" xl:actuate="onRequest" xl:type="arc"
xl:show="replace" xl:to="john"/>

	etc.

Now if a person edits this file, using the above scheme, they will end up
having the attributes expanded in the files they save, not the effect I am
after!

Is there any way to stop this from happening (change the behaviour of
Xinclude, or subclass a special version), or am I (and anyone else who uses
it) just going to have to stop using DTDs this way?


Thanks for any help.

regards Jeremy

-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <mailto:sharkbait@mac.com>     		 <http://www.media.demon.co.uk>
   <phone:+44.[0].20.7737.6831>             <pager:jermq@vizzavi.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message