Subject: using XInclude
To: None <netbsd-docs@NetBSD.org>
From: Klaus Heinz <k.heinz.maer.fuenf@onlinehome.de>
List: netbsd-docs
Date: 03/13/2005 20:10:32
Hi,
I am working on converting news pages (htdocs/Ports/*/news.html) to XML.
At the moment we copy contents (about 5 items) from every <port>/news.html
to <port>/index.html. I would like to take the opportunity and get rid
of this duplication.
There is a XML/XSLT specification called XInclude which is supported by
xsltproc. This lets us even include single XML elements (eg, the last 5
news items) from a referenced XML document.
It looks like this:
<xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="news.xml#xpointer(/webpage/newspage/portnewsitem[1])" />
...
<xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="news.xml#xpointer(/webpage/newspage/portnewsitem[5])" />
Is it ok to add
XSLTPROC_ARGS+= --xinclude
to htdocs/share/mk/web.site.mk? Or should we only do this in those
directories where we actually use XInclude?
ciao
Klaus