This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: including elements with xpointers xincludes


Hi,

I didnt understand exactly what you would like to do, but you can use 
any XPath Expression:

href="../glossary.xml#xpointer(/glossary/glossentry/glossdef) to 
catch all glossdefs
or
href="../glossary.xml#xpointer(/glossary/glossentry[last()]/glossdef)
to get the glossdef of the last glossentry

XPointer is just an XPath Expression.

kind regards,
janning


Am Donnerstag, 12. September 2002 20:59 schrieb Ljósálfr:
> Ljósálfr wrote:
> > I would like to include a specific element from one file in
> > another file. For example. I have a glossary in which every entry
> > has a shot definition, and perhaps a longer definition.  I want
> > to pull the content of the short <glossdef/> into one of the
> > chapters in my book. I've been attempting things such as:
> >
> > <xi:include xmlns:xi="http://www.w3.org/2001/XInclude";
> > href="../glossary.xml#xpointer(id('urđrshort')/*)"/>
> >
> > When I run xsltproc on it to generate the target.db, I get
> > "XInclude: failed build URL". If I simply use
> > ...#xpointer(id(/glossary/*) I get all the entries in the
> > glossary pulled in where the xinclude is located. Should I be
> > able to do what I'm attempting?  What is the syntax for this?
> >
> > TIA
>
> This is wrong:
> #xpointer(id(/glossary/*)
>
> What I meant to say was this:
> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude";
>
> href="../glossary.xml#xpointer(/glossary/*)"/>
>
> I hope no one tried what I originally said worked.  The immediately
> previous snippet does pull in all the entries in the glossary.  I
> don't know how much of the of the xpointer functionality is working
> in xsltproc.  I have not found a great many helpful examples of
> using xpointers on the web.  This seems like a very powerful tool. 
> Are people using it?



-- 
Planwerk 6 /websolutions
Herzogstraße 86
40215 Düsseldorf

fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]