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

2 XML Files, 1 XSLt Output to HTML

Subject: 2 XML Files, 1 XSLt Output to HTML
From: "McDonald, Shaun" <Shaun.McDonald@xxxxxxxxxxx>
Date: Mon, 16 Oct 2006 18:44:06 -0400
 2 XML Files
Hi,

I am using MSXML 3.0

XML SOURCE NAME: doc1.xml
<Oproc id="right">
	<Para>
		<bold id="ao1">text1</bold>
	</Para>
	<Para id="ao2">text2</Para>
	<Para>
		<Bold id="o3">text3</Bold>
	</Para>
	<Para id="ao4">text4</Para>
	<Para id="ao5">text5</Para>
	<Para id="ao6">text6</Para>
	<Para>
		<Caution id="ao7">text7</Caution>
	</Para>
</Oproc>

XML TARGET NAME: doc2.xml

<Oproc>
	<Para>
		<bold id="ao1">
			<share loc="source.xml" item="ao1"/>
		</bold>
		<extRef id="getmaster" href="somedoc.html#idTitle1234"
reflocation="*" refmanual=""/>
	</Para>
	<Para id="ao2">
		<share loc="source.xml" item="ao2"/>
	</Para>
	<Para>
		<Bold id="ao3">
			<share loc="source.xml" item="ao3"/>
		</Bold>
	</Para>
	<Para id="ao4">
		<share loc="source.xml" item="ao4"/>
	</Para>
	<Para id="ao5">
		<share loc="source.xml" item="ao5"/>
	</Para>
	<Para id="ao6">
		<share loc="source.xml" item="ao6"/>
	</Para>
	<Para>
		<Caution id="ao7">
			<share loc="source.xml" item="ao7"/>
		</Caution>
	</Para>
</Oproc>

XSLT Version 1.0:
<xsl:template match="n1:share">
    <xsl:variable name="x" select="@item" />
    <xsl:variable name="xx" select="@loc" />
    <xsl:for-each select="document(@loc)">
      <xsl:value-of select="current()"/>
    </xsl:for-each>
 </xsl:template>

I want,
TARGET: doc2.xml:
<Oproc>
	<Para>
		<bold id="ao1">text1</bold>
		<extRef id="getmaster" href="somedoc.html#idTitle1234"
reflocation="*" refmanual=""/>
	</Para>
	<Para id="ao2">text2</Para>
	<Para>
		<Bold id="ao3">text3</Bold>
	</Para>
	<Para id="ao4">text4</Para>
	<Para id="ao5">text5</Para>
	<Para id="ao6">text6</Para>
	<Para>
		<Caution id="ao7">text7</Caution>
	</Para>
</Oproc>

What I get is,
TARGET: doc2.xml:
<Oproc>
	<Para>
		<bold
id="ao1">text1text2text3text4text5text6text7</bold>
		<extRef id="getmaster" href="somedoc.html#idTitle1234"
reflocation="*" refmanual=""/>
	</Para>
	<Para id="ao2">text1text2text3text4text5text6text7</Para>
	<Para>
		<Bold
id="ao3">text1text2text3text4text5text6text7</Bold>
	</Para>
	<Para id="ao4">text1text2text3text4text5text6text7</Para>
	<Para id="ao5">text1text2text3text4text5text6text7</Para>
	<Para id="ao6">text1text2text3text4text5text6text7</Para>
	<Para>
		<Caution
id="ao7">text1text2text3text4text5text6text7</Caution>
	</Para>
</Oproc>

I inherited these files recently.  From what I have learned, the xslt is
processing as it should.  I have not, however, been able to figure out
how to get the desired output.

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.