xsl-list
[Top] [All Lists]

[xsl] Using for-each-group out of word.xml

2011-08-01 20:19:06
Good evening,

Thank you for your quick response about my last posting. My question today is about underlying logic for a my project.

I'm saving word docs as xml and transforming them to be imported into InDesign.

The tables turned out to be the easiest part because there was an element to element relationship, just had to rearrange some stuff. But the other bits are proving to be quite difficult. The other bits are:

1. Formatting Features:
a. Matching any paragraphstyle (w:p/w:pPr/w:pStyle/@w:val) that begins with 'Feature'
        b. wrapping those lines in an element <_Anchored Feature>,
c. matching the first line styled FeatureType, deleting it and adding a graphic based on it's value.

So, I'm wondering if for-each-group will work for this. Perhaps a group-by="contains(w:pPr/w:pStyle/@w:val,Feature)".

Or, if I continue the logic of matching w:p and then processing it based on it's parastyle.

This is what a feature looks like:

<w:p w:rsidR="006B72DB" w:rsidRPr="00862900" w:rsidRDefault="006B72DB" w:rsidP="006B72DB">
<w:pPr>
<w:pStyle w:val="FeatureType"/>
</w:pPr>
<w:proofErr w:type="gramStart"/>
<w:r>
<w:t>t</w:t>
</w:r>
<w:r w:rsidRPr="00862900">
<w:t>ype</w:t>
</w:r>
<w:proofErr w:type="gramEnd"/>
<w:r w:rsidRPr="00862900">
<w:t>=”general”</w:t>
</w:r>
</w:p>
<w:p w:rsidR="006B72DB" w:rsidRDefault="006B72DB" w:rsidP="006B72DB">
<w:pPr>
<w:pStyle w:val="FeatureTitle"/>
</w:pPr>
<w:r>
<w:lastRenderedPageBreak/>
<w:t>What Do I Type?</w:t>
</w:r>
<w:bookmarkStart w:id="0" w:name="_GoBack"/>
<w:bookmarkEnd w:id="0"/>
</w:p>
<w:p w:rsidR="006B72DB" w:rsidRDefault="006B72DB" w:rsidP="006B72DB">
<w:pPr>
<w:pStyle w:val="FeaturePara"/>
</w:pPr>
<w:r>
<w:t>With Tooltip Assistance set to at least Minimal, you can see the keyboard shortcut for a tool by hovering your mouse pointer over it. The keyboard shortcut is shown in parentheses next to the name of the tool.</w:t>
</w:r>
</w:p>

Thank you for your help.

Designer-turned-xml-translator,
jeff
--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>