From: Artur H. <ko...@pl...> - 2003-09-01 12:03:47
|
> > Now we want to include in master document everything apart from > > <sectioninfo/> element with it's content. > > We can include content of above document apart from <sectioninfo/> > > with following command: > > <xi:include > > href="samplefile.xml#xpointer(/section/*[name()!='sectioninfo']/descendant- > >or-self::*)" xmlns:xi="http://www.w3.org/2001/XInclude" /> > Thinking again about how to remove <sectioninfo> from all the guides, it might > be easier to run all the guides through a XSL filter which strips > <sectioninfo> before calling the docbook parsing. This way, we don't need to > edit the source guides. The stripping XSL could be called from generguide.sh. Below text is to ensure that we are talking about the same thing. Please don't feel offended that I am repeating it again but I want to be sure we understand each other. Well, I didn't mean to remove <sectioninfo> from our guides. Just the opposite, I was thinking about adding it to all guides to have author, copyright, and so on... info included in all files. Because sometimes I would like to generate HTML page from only basicxml.xml document and sometimes I want basicxml.xml to be included as section in another large document. My concern was, how to include such files in master document without having <sectioninfo> content repeated at the beginning of each section in target XML file. Of course, the obvious solution is to omit <sectioninfo> during inclusion part content. But I didn't know if this is possible with <xinclude> element. The above sample shows how to accomplish this and include file content without unnecessary part. Artur -- Artur Hefczyc Open Source Developer http://generguide.sourceforge.net/ http://www.geotools.org/ http://wttools.sourceforge.net/ http://maven-plugins.sourceforge.net/ |