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

Problem Merging multiple XML files

Subject: Problem Merging multiple XML files
From: "Hewko, Doug" <Doug.Hewko@xxxxxxxxxxxxxxx>
Date: Wed, 5 Sep 2001 11:15:42 -0400
merging multiple xml files
I'm building an XML-based photo album (for fun) and ran into a problem. I am
wondering what I am doing wrong. I converted a big XML file into multiple
ones and do not know why I am not getting any output.

I have an XML document that contains the information for the pictures. It
works great as one file. The problem is that there are over 200 pictures,
and this text file is becoming awkward to manage. Plus, I would like to put
it on the Internet (baby pictures) and I have to break the pictures up due
to size restrictions. I thought of converting my picture XML file into
multiple ones that I can import as I see fit.

When I look at the merged XML document in IE, the structure looks identical
to my original big file, with of course the exception of a DOCTYPE
declaration. My XSL remained the same.

Does merging the files create a new structure that is only internally
visible? Or does MSXML display merged files properly but cannot process
them?

I am using MSXML. I know, it's very limited, but it should still work. 

Here's my original XML: picture.xml
<?xml version="1.0" standalone="no"?>
<PICTUREGALLERY>
<PICTURE>
<DATETAKEN>
<YEAR>2001</YEAR>
<MONTH>02</MONTH>
<DAY>03</DAY>
</DATETAKEN>
<THUMBNAIL>
<SOURCE>Thumbnail/20010203 - Baby Shower 2.JPG</SOURCE>
<CAPTION>Baby Shower</CAPTION>
</THUMBNAIL>
<BIGPHOTO>
<SOURCE>Photos/20010203 - Baby Shower 2.JPG</SOURCE>
<CAPTION>A friend held a baby shower for us at her home. The house was very
nicely decorated and it was very enjoyable.</CAPTION>
</BIGPHOTO>
</PICTURE>
<PICTURE>

Here is what I converted it to: picture.xml
<?xml version="1.0"?>
<!DOCTYPE PICTUREGALLERY [
<!ENTITY MARCH2001 SYSTEM "March2001.dat">
]>
<PICTUREGALLERY>
&MARCH2001;
</PICTUREGALLERY>

and here's the input file... March2001.dat
<PICTURE>
<DATETAKEN>
<YEAR>2001</YEAR>
<MONTH>02</MONTH>
<DAY>03</DAY>
</DATETAKEN>
<THUMBNAIL>
<SOURCE>Thumbnail/20010203 - Baby Shower 2.JPG</SOURCE>
<CAPTION>Baby Shower</CAPTION>
</THUMBNAIL>
<BIGPHOTO>
<SOURCE>Photos/20010203 - Baby Shower 2.JPG</SOURCE>
<CAPTION>A friend held a baby shower for us at her home. The house was very
nicely decorated and it was very enjoyable.</CAPTION>
</BIGPHOTO>
</PICTURE>
<PICTURE>

XSL file:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="uri:xsl">

<xsl:template match="/">
<xsl:for-each select="PICTUREGALLERY/PICTURE" order-by="+DATETAKEN">
	    <center>
		<xsl:apply-templates />
		<hr /><br />
		</center>
</xsl:for-each>
</xsl:template>

<xsl:template match="THUMBNAIL">
     <img>
	 <xsl:attribute name="onmouseover">
	 showBig('&quot;<xsl:value-of
select="../BIGPHOTO/SOURCE"/>&quot;',&quot;<xsl:value-of
select="../BIGPHOTO/CAPTION"/>&quot;);
	 </xsl:attribute>
	 <xsl:attribute name="src">
     <xsl:value-of select="SOURCE"/>
 	 </xsl:attribute>
	 </img><br />
	 <xsl:value-of select="CAPTION"/><BR />
	 <small><small>Taken: (<xsl:value-of
select="../DATETAKEN"/>)</small></small>
</xsl:template>

</xsl:stylesheet>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.