forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject Re: XInclude: include file in same directory?
Date Fri, 19 Oct 2007 06:36:04 GMT
On Wed, 2007-10-03 at 14:47 -0700, Brolin Empey wrote:
> Forresters,
> 
> How can I use XInclude to include a file in the same directory as the
> file containing the XInclude element, without having to specify a path
> to the include file?
> 
> For example, I have TechsolProductNews_TPC35.xml and
> TechsolProductNews_TPC35_features.inc.xml in the same products/News/
> directory.
> 
> This works fine:
> 
> <xi:include href="cocoon://products/News/TechsolProductNews_TPC35_features.inc.xml#xpointer(//body/*)"/>
> 
> These both do not work:
> 
> <xi:include href="cocoon://TechsolProductNews_TPC35_features.inc.xml#xpointer(//body/*)"/>
> 
> <xi:include href="cocoon://./TechsolProductNews_TPC35_features.inc.xml#xpointer(//body/*)"/>

I think you need to have relative paths, you should try
<xi:include
href="TechsolProductNews_TPC35_features.inc.xml#xpointer(//body/*)"/>

The cocoon:/ protocol means "Use the relevant pipeline from the current
sitemap" and cocoon:// means "Use it from anywhere".

HTH

salu2

> 
> When I rebuild the static site with either of these non-working
> include URIs, I get this error message (the URI in the error message
> reflects the URI in the source file):
> 
> "X [0]
> products/News/TechsolProductNews_TPC35.html   BROKEN: Resource not
> found: cocoon://TechsolProductNews_TPC35_features.inc.xml"
> 
> I am guessing I could put TechsolProductNews_TPC35_features.inc.xml in
> src/documentation/resources/, but what if I want to keep
> TechsolProductNews_TPC35_features.inc.xml in the same directory as
> TechsolProductNews_TPC35.xml?
> 
> Thanks,
> Brolin
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Mime
View raw message