[xsl] 2 XML Files, 1 XSLt Output to HTML

Subject: [xsl] 2 XML Files, 1 XSLt Output to HTML
From: "McDonald, Shaun" <Shaun.McDonald@xxxxxxxxxxx>
Date: Mon, 16 Oct 2006 18:44:06 -0400
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