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

Merge Question Take 2 (complex)

Subject: Merge Question Take 2 (complex)
From: "John Hamman" <John@xxxxxxxxxxxxxxxxx>
Date: Wed, 7 Apr 2004 15:27:20 -0400
spanish versions of english names
Ok I have successfully merged 2 documents that had the same Root namespace.
But now I have a more complext Merge question.
Now one of my xml docs has the following sytax


Page.xml
<?xml version="1.0" encoding="UTF-8"?>
	<Page id="somepageid" version="1.0" published="1.0" current="1.0">
		<Content>
			<Local local="en-US">
				...lots of sub stuff in "English"
			</Local >
			<Local local="es-ES">
			...lots of sub stuff in "Spanish"
		</Content>
	</Page>

Event.xml
<Page>
	<News>
		<event>
			<Title local="en-US">English name</Title>	
			<Title local="es-ES">Spanish name</Title>	
		<details>some non language specific details</details>
		</event>
		<event>
			<Title local="en-US">English name</Title>	
			<Title local="es-ES">Spanish name</Title>	
		<details>some non language specific details</details>
		</event>
	</News>
</Page>

Ok I have a merge xml too
<files>
	<file>home.xml</file>
	<file>Event.xml</file>
</files>

Merger.xsl
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="files">
    <Page>
      <xsl:copy-of
select="document(file)//Page/Content/Local[@id='en-US']/*"/>
    </ Page >
  </xsl:template>
</xsl:stylesheet>

And I want to merge them together, BUT I want only certain information in
this merger so that the output is like this. This is what it would look like
if I only wanted the English information.


<Page id="somepageid" version="1.0" published="1.0" current="1.0">
		<Content>
			<Local local="en-US">
				...lots of sub stuff in "English"
			</Local >
		</Content>
<News>
		<event>
			<Title local="en-US">English name</Title>	
			<details>some non language specific
details</details>
		</event>
		<event>
			<Title local="en-US">English name</Title>	
			<details>some non language specific
details</details>
		</event>
	</News>
</Page>



Is this possible like this. Would it be more possible if I changed the way
the xml is in the page.xml and event.xml docs?
Thanks
john

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.