FW: Outputting element name and position as element ID
"Teresa Rippeon" <[email protected]> Thu, 12 Jun 2003 08:44:17 -0400
| Newsgroups | gmane.text.xml.xsl.general |
|---|---|
| Organization | Mantech |
| Message-ID | <000001c330e0$56ca9370$5701015d@RIGEL> |
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C330BE.CFBC00B0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
I am transforming XML data to XML data and want to insert an ID for each
child element of a particular parent:
For example, I have the following XML data:
<Block ID="B_35000">
<BlockLabel>Introduction</BlockLabel>
<BlockContent>
<Para>This is the RLO introduction</Para>
<List>
<ListTitle>LIST TITLE</ListTitle>
<ListParagraphText>THi is th paragraph text prior to the
list: </ListParagraphText>
<ListItem>
<Para>This is the first list item</Para>
</ListItem>
<ListItem/>
<ListItem>
<Para>This is the second list item</Para>
</ListItem>
</List>
<Para>This is the paragraph after the list</Para>
</BlockContent>
</Block>
I would like to add in an ID for each Para and List element of the
BlockContent element, based on the Block elements ID. The requested
result is as follows:
<Block ID="B_35000">
<BlockLabel>Introduction</BlockLabel>
<BlockContent>
<Para ID="B_35000_1">This is the RLO introduction</Para>
<List ID="B_35000_2">
<ListTitle>LIST TITLE</ListTitle>
<ListParagraphText>THi is th paragraph text prior to the
list: </ListParagraphText>
<ListItem>
<Para>This is the first list item</Para>
</ListItem>
<ListItem/>
<ListItem>
<Para>This is the second list item</Para>
</ListItem>
</List>
<Para ID="B_35000_3">This is the paragraph after the list</Para>
</BlockContent>
</Block>
I am currently using the following XSL code, which obviously goes
through the Para elements first, then the List elements second, so it
destroys the original order:
<xsl:template match="Block">
<xsl:element name="Block">
<xsl:variable name="BLOCKID" select="@ID"></xsl:variable>
<xsl:attribute name="ID" >
<xsl:value-of select="$BLOCKID"/>
</xsl:attribute>
<xsl:apply-templates select="BlockLabel"></xsl:apply-templates>
<xsl:for-each select="BlockContent">
<xsl:element name="BlockContent">
<xsl:for-each select="Para">
<xsl:element name="Para">
<xsl:attribute name="ID">
<xsl:value-of select="$BLOCKID"></xsl:value-of>
<xsl:text>_</xsl:text>
<xsl:value-of select="position()"></xsl:value-of>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
<xsl:for-each select="List">
<xsl:element name="List">
<xsl:attribute name="ID">
<xsl:value-of select="$BLOCKID"></xsl:value-of>
<xsl:text>_</xsl:text>
<xsl:value-of select="position()"></xsl:value-of>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
How can I get the element name and write out the element name with the
appropriate attribute based on the $BLOCKID and position of the element,
and then obviously write out the element content? I think I did
something like this months ago, but can't seem to come up with it again.
Any help would be appreciated!
Thanks.
Teresa Rippeon
ManTech
[email protected]
------=_NextPart_000_0001_01C330BE.CFBC00B0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Message</TITLE>
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DTahoma size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D534115920-10062003>I am =
transforming=20
XML data to XML data and want to insert an ID for each child element of =
a=20
particular parent:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D534115920-10062003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D534115920-10062003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D534115920-10062003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D534115920-10062003>For =
example, I have=20
the following XML data:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV><FONT size=3D1>
<DIV align=3Dleft></FONT><FONT face=3DArial><FONT size=3D2><STRONG><FONT =
color=3D#0000ff><</FONT><FONT color=3D#800000>Block</FONT><FONT =
color=3D#ff0000>=20
ID</FONT><FONT color=3D#0000ff>=3D"</FONT>B_35000<FONT=20
color=3D#0000ff>"></FONT></STRONG></FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> </SPAN><</FONT><FONT=20
color=3D#800000>BlockLabel</FONT><FONT =
color=3D#0000ff>></FONT>Introduction<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>BlockLabel</FONT><FONT =
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> </SPAN><</FONT><FONT=20
color=3D#800000>BlockContent</FONT><FONT=20
color=3D#0000ff>></FONT></FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT=20
color=3D#0000ff> </DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> =20
</SPAN><STRONG><</STRONG></FONT><STRONG><FONT =
color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></FONT></STRONG>This is the RLO introduction<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></FONT></FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT=20
color=3D#0000ff> </DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> =20
</SPAN><STRONG><</STRONG></FONT><STRONG><FONT =
color=3D#800000>List</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></STRONG></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p;</SPAN><SPAN=20
class=3D534115920-10062003> </SPAN><</FONT><FONT=20
color=3D#800000>ListTitle</FONT><FONT color=3D#0000ff>></FONT>LIST =
TITLE<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>ListTitle</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p;</SPAN><SPAN=20
class=3D534115920-10062003> </SPAN><</FONT><FONT=20
color=3D#800000>ListParagraphText</FONT><FONT =
color=3D#0000ff>></FONT>THi is th=20
paragraph text prior to the list: <FONT =
color=3D#0000ff></</FONT><FONT=20
color=3D#800000>ListParagraphText</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN><</FONT><FONT color=3D#800000>ListItem</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN><</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></FONT>This is the first list item<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN></</FONT><FONT color=3D#800000>ListItem</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN><</FONT><FONT color=3D#800000>ListItem</FONT><FONT=20
color=3D#0000ff>/></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p;</SPAN><SPAN=20
class=3D534115920-10062003> </SPAN><</FONT><FONT=20
color=3D#800000>ListItem</FONT><FONT =
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN><</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></FONT>This is the second list item<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN></</FONT><FONT color=3D#800000>ListItem</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> </SPAN><SPAN=20
class=3D534115920-10062003> </SPAN></</FONT><FONT=20
color=3D#800000>List</FONT><FONT =
color=3D#0000ff>></FONT></FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT=20
color=3D#0000ff> </DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> </SPAN><SPAN=20
class=3D534115920-10062003> =20
</SPAN><STRONG><</STRONG></FONT><STRONG><FONT =
color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></FONT></STRONG>This is the paragraph after the =
list<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></FONT></FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT=20
color=3D#0000ff> </DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> </SPAN></</FONT><FONT=20
color=3D#800000>BlockContent</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>Block</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D534115920-10062003>I =
would like to add=20
in an ID for each Para and List element of the BlockContent element, =
based on=20
the Block elements ID. The requested result is as =
follows:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D534115920-10062003></SPAN></FONT> </DIV>
<DIV><FONT size=3D+0><SPAN class=3D534115920-10062003>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><STRONG><FONT=20
color=3D#0000ff><</FONT><FONT color=3D#800000>Block</FONT><FONT =
color=3D#ff0000>=20
ID</FONT><FONT color=3D#0000ff>=3D"</FONT>B_35000<FONT=20
color=3D#0000ff>"></FONT></STRONG></FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> </SPAN><</FONT><FONT=20
color=3D#800000>BlockLabel</FONT><FONT =
color=3D#0000ff>></FONT>Introduction<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>BlockLabel</FONT><FONT =
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> </SPAN><</FONT><FONT=20
color=3D#800000>BlockContent</FONT><FONT=20
color=3D#0000ff>></FONT></FONT></FONT></DIV>
<DIV align=3Dleft><FONT size=3D2><FONT face=3DArial><FONT=20
color=3D#0000ff> </DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> =20
</SPAN><STRONG><</STRONG></FONT><STRONG><FONT =
color=3D#800000>Para<SPAN=20
class=3D534115920-10062003> </SPAN></FONT><FONT color=3D#0000ff><FONT=20
color=3D#ff0000>ID</FONT><FONT color=3D#0000ff>=3D"</FONT><FONT=20
color=3D#000000>B_35000<SPAN =
class=3D534115920-10062003>_1</SPAN></FONT><FONT=20
color=3D#0000ff>"></FONT></FONT></STRONG>This is the RLO =
introduction<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></FONT></FONT></FONT></DIV>
<DIV align=3Dleft><FONT size=3D2><FONT face=3DArial><FONT=20
color=3D#0000ff> </DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> =20
</SPAN><STRONG><</STRONG></FONT><STRONG><FONT =
color=3D#800000>List<SPAN=20
class=3D534115920-10062003> <FONT color=3D#ff0000>ID</FONT><FONT=20
color=3D#0000ff>=3D"</FONT><FONT color=3D#000000>B_35000<SPAN=20
class=3D534115920-10062003>_2</SPAN></FONT><FONT=20
color=3D#0000ff>"></FONT></SPAN></FONT><FONT=20
color=3D#0000ff></DIV></FONT></STRONG></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p;</SPAN><SPAN=20
class=3D534115920-10062003> </SPAN><</FONT><FONT=20
color=3D#800000>ListTitle</FONT><FONT color=3D#0000ff>></FONT>LIST =
TITLE<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>ListTitle</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p;</SPAN><SPAN=20
class=3D534115920-10062003> </SPAN><</FONT><FONT=20
color=3D#800000>ListParagraphText</FONT><FONT =
color=3D#0000ff>></FONT>THi is th=20
paragraph text prior to the list: <FONT =
color=3D#0000ff></</FONT><FONT=20
color=3D#800000>ListParagraphText</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN><</FONT><FONT color=3D#800000>ListItem</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN><</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></FONT>This is the first list item<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN></</FONT><FONT color=3D#800000>ListItem</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN><</FONT><FONT color=3D#800000>ListItem</FONT><FONT=20
color=3D#0000ff>/></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p;</SPAN><SPAN=20
class=3D534115920-10062003> </SPAN><</FONT><FONT=20
color=3D#800000>ListItem</FONT><FONT =
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN><</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></FONT>This is the second list item<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> &nbs=
p; =20
</SPAN></</FONT><FONT color=3D#800000>ListItem</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> </SPAN><SPAN=20
class=3D534115920-10062003> </SPAN></</FONT><FONT=20
color=3D#800000>List</FONT><FONT =
color=3D#0000ff>></FONT></FONT></FONT></DIV>
<DIV align=3Dleft><FONT size=3D2><FONT face=3DArial><FONT=20
color=3D#0000ff> </DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> </SPAN><SPAN=20
class=3D534115920-10062003> =20
</SPAN><STRONG><</STRONG></FONT><STRONG><FONT =
color=3D#800000>Para<SPAN=20
class=3D534115920-10062003> </SPAN></FONT><FONT color=3D#0000ff><FONT=20
color=3D#ff0000>ID</FONT><FONT color=3D#0000ff>=3D"</FONT><FONT=20
color=3D#000000>B_35000<SPAN =
class=3D534115920-10062003>_3</SPAN></FONT><FONT=20
color=3D#0000ff>"></FONT></FONT></STRONG>This is the paragraph after =
the=20
list<FONT color=3D#0000ff></</FONT><FONT =
color=3D#800000>Para</FONT><FONT=20
color=3D#0000ff>></FONT></FONT></FONT></DIV>
<DIV align=3Dleft><FONT size=3D2><FONT face=3DArial><FONT=20
color=3D#0000ff> </DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#0000ff><SPAN=20
class=3D534115920-10062003> </SPAN></</FONT><FONT=20
color=3D#800000>BlockContent</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT>
<DIV align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>Block</FONT><FONT=20
color=3D#0000ff>></DIV></FONT></FONT></FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D534115920-10062003>I am =
currently using=20
the following XSL code, which obviously goes through the Para elements =
first,=20
then the List elements second, so it destroys the original=20
order:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D534115920-10062003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D534115920-10062003><FONT =
color=3D#0000ff=20
size=3D1> </DIV>
<DIV><FONT color=3D#000000 size=3D2><</FONT></FONT>xsl:template =
match=3D"Block<FONT=20
color=3D#0000ff size=3D1><FONT color=3D#000000 =
size=3D2>"></FONT></DIV></FONT><FONT=20
size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:element</FONT><FONT color=3D#ff0000> =
name</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>Block<FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>"></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:variable</FONT><FONT color=3D#ff0000> =
name</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>BLOCKID<FONT color=3D#0000ff>"</FONT><FONT =
color=3D#ff0000>=20
select</FONT><FONT color=3D#0000ff>=3D"</FONT>@ID<FONT=20
color=3D#0000ff>"></</FONT><FONT =
color=3D#800000>xsl:variable</FONT><FONT=20
color=3D#0000ff size=3D1><FONT size=3D2>></FONT></DIV></FONT><FONT =
size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:attribute</FONT><FONT color=3D#ff0000> =
name</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>ID<FONT color=3D#0000ff>"</FONT><FONT =
color=3D#ff0000>=20
</FONT><FONT color=3D#0000ff size=3D1><FONT =
size=3D2>></FONT></DIV></FONT><FONT=20
size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:value-of</FONT><FONT color=3D#ff0000> =
select</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>$BLOCKID<FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>"/></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff></</FONT><FONT=20
color=3D#800000>xsl:attribute</FONT><FONT color=3D#0000ff size=3D1><FONT =
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:apply-templates</FONT><FONT color=3D#ff0000> =
select</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>BlockLabel<FONT =
color=3D#0000ff>"></</FONT><FONT=20
color=3D#800000>xsl:apply-templates</FONT><FONT color=3D#0000ff =
size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV> </DIV>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:for-each</FONT><FONT color=3D#ff0000> =
select</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>BlockContent<FONT color=3D#0000ff =
size=3D1><FONT=20
size=3D2>"></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:element</FONT><FONT color=3D#ff0000> =
name</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>BlockContent<FONT color=3D#0000ff =
size=3D1><FONT=20
size=3D2>"></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:for-each</FONT><FONT color=3D#ff0000> =
select</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>Para<FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>"></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:element</FONT><FONT color=3D#ff0000> =
name</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>Para<FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>"></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:attribute</FONT><FONT color=3D#ff0000> =
name</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>ID<FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>"></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:value-of</FONT><FONT color=3D#ff0000> =
select</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>$BLOCKID<FONT =
color=3D#0000ff>"></</FONT><FONT=20
color=3D#800000>xsl:value-of</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:text</FONT><FONT color=3D#0000ff>></FONT>_<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>xsl:text</FONT><FONT =
color=3D#0000ff=20
size=3D1><FONT size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:value-of</FONT><FONT color=3D#ff0000> =
select</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>position()<FONT =
color=3D#0000ff>"></</FONT><FONT=20
color=3D#800000>xsl:value-of</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff></</FONT><FONT=20
color=3D#800000>xsl:attribute</FONT><FONT color=3D#0000ff size=3D1><FONT =
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff></</FONT><FONT=20
color=3D#800000>xsl:element</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff></</FONT><FONT=20
color=3D#800000>xsl:for-each</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:for-each</FONT><FONT color=3D#ff0000> =
select</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>List<FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>"></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:element</FONT><FONT color=3D#ff0000> =
name</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>List<FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>"></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:attribute</FONT><FONT color=3D#ff0000> =
name</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>ID<FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>"></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:value-of</FONT><FONT color=3D#ff0000> =
select</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>$BLOCKID<FONT =
color=3D#0000ff>"></</FONT><FONT=20
color=3D#800000>xsl:value-of</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:text</FONT><FONT color=3D#0000ff>></FONT>_<FONT=20
color=3D#0000ff></</FONT><FONT color=3D#800000>xsl:text</FONT><FONT =
color=3D#0000ff=20
size=3D1><FONT size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff><</FONT><FONT=20
color=3D#800000>xsl:value-of</FONT><FONT color=3D#ff0000> =
select</FONT><FONT=20
color=3D#0000ff>=3D"</FONT>position()<FONT =
color=3D#0000ff>"></</FONT><FONT=20
color=3D#800000>xsl:value-of</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff></</FONT><FONT=20
color=3D#800000>xsl:attribute</FONT><FONT color=3D#0000ff size=3D1><FONT =
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff></</FONT><FONT=20
color=3D#800000>xsl:element</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff></</FONT><FONT=20
color=3D#800000>xsl:for-each</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff></</FONT><FONT=20
color=3D#800000>xsl:element</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV></FONT><FONT color=3D#0000ff></</FONT><FONT=20
color=3D#800000>xsl:for-each</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV></FONT><FONT size=3D1>
<DIV> </DIV>
<DIV></FONT><FONT color=3D#0000ff></</FONT><FONT=20
color=3D#800000>xsl:element</FONT><FONT color=3D#0000ff size=3D1><FONT=20
size=3D2>></FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></</FONT></FONT>xsl:template<FONT =
color=3D#0000ff size=3D1><FONT color=3D#000000 =
size=3D2>></FONT></DIV>
<DIV></FONT></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D534115920-10062003>How =
can I get the=20
element name and write out the element name with the appropriate =
attribute based=20
on the $BLOCKID and position of the element, and then obviously write =
out the=20
element content? I think I did something like this months ago, but can't =
seem to=20
come up with it again. Any help would be =
appreciated!</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D534115920-10062003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D534115920-10062003>Thanks.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D534115920-10062003></SPAN></FONT> </DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>Teresa =
Rippeon</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>ManTech</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial=20
size=3D2>[email protected]</FONT></DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0001_01C330BE.CFBC00B0--