From: Artur H. <ko...@pl...> - 2003-06-21 21:40:34
|
> xsltproc a while back without success. You might be able to work out how > to do it.) So I should be able to write: > <para>In the > <xi:include href="config.xml#xpointer(/project/project-name[1]/*)" > xmlns:xi="http://www.w3.org/2001/XInclude"/> > project, we do things this way: ... </para> I was thinking about this, and I am sure it is possible to do it. However this kind of processing has some limitations of use. We can't accomplish more complex inclusions this way. i. e. for developers list: <developers> <developer> <first-name>Cameron</first-name> <surr-name>Shorter</surr-name> <email>ca...@us...</email> <role>Manager</role> </developer> <developer> <first-name>Artur</first-name> <surr-name>Hefczyc</surr-name> <email>ko...@us...</email> <role>Developer</role> </developer> </developers> we can access only one developer element. I can't see any way to do inclusions with use of loops. The only solution to this I see XSLT which is almost full featured language with loops, conditionals and so on. Please don't think I try to force XSLT use. I try only warn about traps and suggest possible solutions. XSLT is the only technology I know for this kind of XML processing. Maybe there also good alternatives. Another problem I found is that current xinclude.mod doesn't allow to use <xi:include .../> tag after </section> closing tag. After some investigation I see that it is because of 'section' definition on SDocBook DTD. Probably I can modify xinclude.mod to allow this kind of use. I can add at least one file to CVS repository - basicxml.xml. However it seems to me it is not good to have most files with 'sgml' extension and one or a few of them with 'xml' extension. If you make a decision what extension to use I will add new file to CVS repository. Artur -- Artur Hefczyc Open Source Developer http://generguide.sourceforge.net/ http://www.geotools.org/ http://wttools.sourceforge.net/ |