[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Concatenating multiple input documents into a sing

Subject: Re: Concatenating multiple input documents into a single node-set
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 May 2004 06:40:47 +0800
xsl multiple input documents
Remove the <xsl:copy> ... if you don't want it, don't ask for it to be copied:

<xsl:template match="rng:include">
  <xsl:apply-templates select="document(@href)" />
</xsl:template>

I hope this helps.

....................... Ken

At 2004-05-11 09:14 -0700, Chris von See wrote:
I suspect I did a very poor job of explaining what I wanted... let's try
again...

Basically what I'm trying to do is "expand" a RELAX-NG schema so that all of
the includes are merged in-place into the main part of the schema.  If I
understand your example correctly, what you're proposing would work for those
includes that are in the main schema document, but includes that are nested
inside other included documents would not get expanded.  It sounds like I
can solve this problem by wrapping your solution (or something like it) in a
template which selected on rng:include, e.g.:

<xsl:template match="rng:include">
  <xsl:copy>
    <xsl:apply-templates select="document(@href)" />
  </xsl:copy>
</xsl:template>

This should include the content of each include, in document order. BUT... if
I do this, it looks like I'll get the <include> element in my output in
addition to the content of the included document, e.g.:


<include href="whatever.rng">
  ... content from included document
</include>

How would you suggest I avoid generating the enclosing <include> element?  Is
there a better way to do this?


Cheers Chris


--
Public courses: Spring 2004 world tour of hands-on XSL instruction
Next: 3-day XSLT/XPath; 2-day XSL-FO - Birmingham, UK June 14,2004

World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.