[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Merging Document Problem


Subject: RE: [xsl] Merging Document Problem
From: "John Hamman" <John@xxxxxxxxxxxxxxxxx>
Date: Sun, 4 Jul 2004 13:25:38 -0400

Thanks Michael,
I don't see anything that begin with XML or at least it shouldn't. 
And I just want to copy/merge the document that is below (breadcrumb.xml)
To another xml document so that it's a DIRECT copy. Meaning I want it to end
up looking the same.
So for example.
If Breadcrumb.xml looks like this
<ensemble>
	<theater>
		<instrument type="BreadCrumb" id="PageBreadCrumb">
			<!-- This App is the bread crumb of the page. -->
			<Breadcrumb>
				<Topic title="Home" link="/">
					<Topic title="Services"
link="/services">
						<Topic title="Content
Management" link="/services/content-management"/>
					</Topic>
				</Topic>
			</Breadcrumb>
		</instrument>
	</theater>
</ensemble>

And DocumentB.xml looks like this
<ensemble>
	<theater>
		<performance link="/Some/Link" topic="/services"
lang="en-US" title="My Music" ver="1.0" lastmod="6/30/2004T12:00:00:00">
			<!-- Page Info  -->
			<FriendlyName>Friendlyname here</FriendlyName>
			<Activate date="2000-01-15T12:00:00"/>
			<Expires date="2005-01-15T12:00:00"/>
			<Creator>John Hamman</Creator>
			<MetaData name="copyright" value="Copyright 2004"/>
			<Description><![CDATA[Blah Blah
Blah]]></Description>
			<Keywords>Blah Blah Blah</Keywords>
			<Custom name="CssName"><![CDATA[IA]]></Custom>
		</performance>
	</theater>
</ensemble>

Then the OUTPUT will be a Merged XML file that looks like this.
<ensemble>
	<theater>
		<performance link="/Some/Link" topic="/services"
lang="en-US" title="My Music" ver="1.0" lastmod="6/30/2004T12:00:00:00">
			<!-- Page Info  -->
			<FriendlyName>Friendlyname here</FriendlyName>
			<Activate date="2000-01-15T12:00:00"/>
			<Expires date="2005-01-15T12:00:00"/>
			<Creator>John Hamman</Creator>
			<MetaData name="copyright" value="Copyright 2004"/>
			<Description><![CDATA[Blah Blah
Blah]]></Description>
			<Keywords>Blah Blah Blah</Keywords>
			<Custom name="CssName"><![CDATA[IA]]></Custom>
		</performance>
<instruments>
			<instrument type="BreadCrumb" id="PageBreadCrumb">
			<!-- This App is the bread crumb of the page. -->
			<Breadcrumb>
				<Topic title="Home" link="/">
					<Topic title="Services"
link="/services">
						<Topic title="Content
Management" link="/services/content-management"/>
					</Topic>
				</Topic>
			</Breadcrumb>
		</instrument>
		</instruments>
	</theater>
</ensemble>






-----Original Message-----
From: Michael Kay [mailto:mhk@xxxxxxxxx] 
Sent: Sunday, July 04, 2004 1:17 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Merging Document Problem

Without knowing what the other document looks like, or what you want the
result to look like, it's very hard to advise you.

2 observations on your XML:

(a) Names beginning "xml" (in any case combination), like XmlSite, should
not be used because they are reserved for future standardisation

(b) The value of xsi:noNamespaceSchemaLocation is supposed to be a URI. The
value "H:\Web
Clients\WWWRoot\Ithinkdesigns\XmlSite\_data\Performance.xsd" is not a URI,
it is a Windows filename. This essentially locks you into Microsoft
products, which don't enforce the standard in this area.

Michael Kay

> -----Original Message-----
> From: John Hamman [mailto:John@xxxxxxxxxxxxxxxxx] 
> Sent: 04 July 2004 01:32
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Merging Document Problem
> 
> Hi all, Maybe someone can help with this.
> 
> I have 2 docs I want to merge and one of them is this:
> 
>  
> 
> Breadcrumb.xml
> 
> <ensemble xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="H:\Web
> Clients\WWWRoot\Ithinkdesigns\XmlSite\_data\Performance.xsd">
> 
>             <theater>
> 
>                         <instrument type="BreadCrumb" 
> id="PageBreadCrumb">
> 
>                                     <!-- This App is the 
> bread crumb of the
> page. -->
> 
>                                     <Breadcrumb>
> 
>                                                 <Topic title="Home"
> link="/">
> 
>                                                             <Topic
> title="Services" link="/services">
> 
>  
> <Topic title="Content Management" 
> link="/services/content-management"/>
> 
>                                                             </Topic>
> 
>                                                 </Topic>
> 
>                                     </Breadcrumb>
> 
>                         </instrument>
> 
>             </theater>
> 
> </ensemble>
> 
>  
> 
> And I want to make sure that everything from <theater> on is 
> copied exactly
> like this one.
> 
> Does anyone know how I can do this. I am totally lost since 
> its recursive
> 
> john
> 
> 
> 
> --+------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> --+--
> 
> 


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--




Current Thread
Keywords