I am a bit stuck on this one. After converting a Word document to rtf
and using upCast I end up with a "flat" structure such as this:
<document>
<part>
<par class="stem_mc">	1	Read the sentence. Then choose the
best synonym to replace the boldfaced word.</par>
<par class="display">The threat of rain makes it <inline
style="font-weight: bold;">dubious</inline> that the game will go on
as scheduled.</par>
<par class="choice-a">	A	doubtful</par>
<par class="choice-b">	B	likely</par>
<par class="choice-c">	C	hopeful</par>
<par class="choice-d">	D	obvious</par>
<par class="Answer">A</par>
<par class="g_code">G5U1S5</par>
<par class="stem_mc">	2	As used in the sentence below,
what is the denotation of the word <inline style="font-style:
italic;">mutt?</inline></par>
<par class="display">“What is that mutt doing in our yard?”
asked Dad.</par>
<par class="choice-a">	A	animal</par>
<par class="choice-b">	B	dog </par>
<par class="choice-c">	C	creature</par>
<par class="choice-d">	D	pet</par>
<par class="Answer">B</par>
<par class="g_code">G5U1S8</par>
<par class="stem_sa">	3	Describe the connotation of the
word <inline style="font-style: italic;">mutt</inline> and explain
wheeher it is positive or negative. </par>
<par class="Answer"><inline style="font-style: italic;"><target
id="OLE_LINK1" /><target id="OLE_LINK2" />Answers will vary. Possible
answer:</inline> The word <inline style="font-style: italic;">mutt</
inline> has the negative connotation of a dog that isn’t worth very
much or that isn’t good-looking.<endtarget id="OLE_LINK1" /
><endtarget id="OLE_LINK2" /></par>
<par class="g_code">G5U1S8</par>
<--much more like this-->
</part>
</document>
My goal is the wrap each question in a question element:
<question>
<par class="stem_mc">	1	Read the sentence. Then choose the best
synonym to replace the boldfaced word.</par>
<par class="display">The threat of rain makes it <inline
style="font-weight: bold;">dubious</inline> that the game will go on
as scheduled.</par>
<par class="choice-a">	A	doubtful</par>
<par class="choice-b">	B	likely</par>
<par class="choice-c">	C	hopeful</par>
<par class="choice-d">	D	obvious</par>
<par class="Answer">A</par>
<par class="g_code">G5U1S5</par>
</question>
<question>
<par class="stem_mc">	2	As used in the sentence below,
what is the denotation of the word <inline style="font-style:
italic;">mutt?</inline></par>
<par class="display">“What is that mutt doing in our yard?”
asked Dad.</par>
<par class="choice-a">	A	animal</par>
<par class="choice-b">	B	dog </par>
<par class="choice-c">	C	creature</par>
<par class="choice-d">	D	pet</par>
<par class="Answer">B</par>
<par class="g_code">G5U1S8</par>
</question>
<question>
<par class="stem_sa">	3	Describe the connotation of the word
<inline style="font-style: italic;">mutt</inline> and explain wheeher
it is positive or negative. </par>
<par class="Answer"><inline style="font-style: italic;"><target
id="OLE_LINK1" /><target id="OLE_LINK2" />Answers will vary. Possible
answer:</inline> The word <inline style="font-style: italic;">mutt</
inline> has the negative connotation of a dog that isn’t worth very
much or that isn’t good-looking.<endtarget id="OLE_LINK1" /
><endtarget id="OLE_LINK2" /></par>
<par class="g_code">G5U1S8</par>
</question>
Notice that each question starts with a stem attribute and is
anchored with a g_code attribute. But there can be various <par>
elements between. Is there an easy way to "select" all the <par>
elements between two <par> elements?
Terry Ofner
--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--