473,397 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to apply template for the first w:p in w:tbl?

Regardless of the nesting level in that particular w:tbl. For example:

Expand|Select|Wrap|Line Numbers
  1. <w:p w:rsidR="AAAAAA">
  2. </w:p>
  3. ...
  4. <w:tbl>
  5.             <w:tblPr>
  6.                 <w:tblStyle w:val="TableGrid"/>
  7.                 <w:tblW w:w="0" w:type="auto"/>
  8.                 <w:tblLook w:val="04A0"/>
  9.             </w:tblPr>
  10.             <w:tblGrid>
  11.                 <w:gridCol w:w="2394"/>
  12.                 <w:gridCol w:w="2394"/>
  13.                 <w:gridCol w:w="2394"/>
  14.                 <w:gridCol w:w="2394"/>
  15.             </w:tblGrid>
  16.             <w:tr w:rsidR="0065563E" w:rsidTr="0065563E">
  17.                 <w:tc>
  18.                     <w:tcPr>
  19.                         <w:tcW w:w="2394" w:type="dxa"/>
  20.                     </w:tcPr>
  21.  
  22.                     <w:p w:rsidR="000000000" w:rsidRDefault="003A0CBE" w:rsidP="0015368C">
  23.                         <w:r>
  24.                             <w:t>C11</w:t>
  25.                         </w:r>
  26.                     </w:p>
  27.  
  28.                 </w:tc>
  29.                 <w:tc>
  30.                     <w:tcPr>
  31.                         <w:tcW w:w="2394" w:type="dxa"/>
  32.                     </w:tcPr>
  33.                     <w:p w:rsidR="11111111" w:rsidRDefault="003A0CBE" w:rsidP="0015368C">
  34.                         <w:r>
  35.                             <w:t>C12</w:t>
  36.                         </w:r>
  37.                     </w:p>
  38.                 </w:tc>
  39.                 <w:tc>
  40.                     <w:tcPr>
  41.                         <w:tcW w:w="2394" w:type="dxa"/>
  42.                     </w:tcPr>
  43.                     <w:p w:rsidR="0065563E" w:rsidRDefault="003A0CBE" w:rsidP="0015368C">
  44.                         <w:r>
  45.                             <w:t>C13</w:t>
  46.                         </w:r>
  47.                     </w:p>
  48.                 </w:tc>
  49.                 <w:tc>
  50.                     <w:tcPr>
  51.                         <w:tcW w:w="2394" w:type="dxa"/>
  52.                     </w:tcPr>
  53.                     <w:p w:rsidR="0065563E" w:rsidRDefault="003A0CBE" w:rsidP="0015368C">
  54.                         <w:r>
  55.                             <w:t>C14</w:t>
  56.                         </w:r>
  57.                     </w:p>
  58.                 </w:tc>
  59.             </w:tr>
  60.             <w:tr w:rsidR="0065563E" w:rsidTr="0065563E">
  61.                 <w:tc>
  62.                     <w:tcPr>
  63.                         <w:tcW w:w="2394" w:type="dxa"/>
  64.                     </w:tcPr>
  65.                     <w:p w:rsidR="0065563E" w:rsidRDefault="003A0CBE" w:rsidP="0015368C">
  66.                         <w:r>
  67.                             <w:t>C21</w:t>
  68.                         </w:r>
  69.                     </w:p>
  70.                 </w:tc>
  71.                 <w:tc>
  72.                     <w:tcPr>
  73.                         <w:tcW w:w="2394" w:type="dxa"/>
  74.                     </w:tcPr>
  75.                     <w:p w:rsidR="0065563E" w:rsidRDefault="003A0CBE" w:rsidP="0015368C">
  76.                         <w:r>
  77.                             <w:t>C22</w:t>
  78.                         </w:r>
  79.                     </w:p>
  80.                 </w:tc>
  81.                 <w:tc>
  82.                     <w:tcPr>
  83.                         <w:tcW w:w="2394" w:type="dxa"/>
  84.                     </w:tcPr>
  85.                     <w:p w:rsidR="0065563E" w:rsidRDefault="003A0CBE" w:rsidP="0015368C">
  86.                         <w:r>
  87.                             <w:t>C23</w:t>
  88.                         </w:r>
  89.                     </w:p>
  90.                 </w:tc>
  91.                 <w:tc>
  92.                     <w:tcPr>
  93.                         <w:tcW w:w="2394" w:type="dxa"/>
  94.                     </w:tcPr>
  95.                     <w:p w:rsidR="0065563E" w:rsidRDefault="003A0CBE" w:rsidP="0015368C">
  96.                         <w:r>
  97.                             <w:t>C24</w:t>
  98.                         </w:r>
  99.                     </w:p>
  100.                 </w:tc>
  101.             </w:tr>
  102.  
  103.  

In that case <w:p w:rsidR="11111111"> should be ignored as well as all consequentive <w:p>s inside of w:tbl at any nesting level. But <w:p w:rsidR="AAAAAA"> and <w:p w:rsidR="000000000" > must be processed. How to write it in select expression for xsl:template?
Jan 30 '10 #1
1 2627
Dormilich
8,658 Expert Mod 8TB
the first one would be
Expand|Select|Wrap|Line Numbers
  1. //w:p[1]
and the first nested
Expand|Select|Wrap|Line Numbers
  1. //w:tbl/descendant::w:p[1]
Jan 30 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Daryl | last post by:
Hello I am using apply-templates and would like to pass a parameter to the template using with-param. Using call-template passes the parameter, but when I use apply-templates, the parameter seems...
5
by: david hepworth | last post by:
Hi All I will try to explain my problem. I am wishing to apply a template to the following XML. There are multiple event nodes within the register root node. For each of the event nodes there...
2
by: parksch2 | last post by:
Quick question: How would I nest the apply templates on the following XML structure? /ITEM/CHILD/ITEM/CHILD/ITEM/CHILD I would first like to apply templates on /ITEM/CHILD. Within that...
3
by: bjam | last post by:
Help! The apply-templates function is not currently allowing me to select a specific template... eventhough I tried putting a select statement, it does not seem to work??? Can someone help show...
7
by: KJ | last post by:
What does this do: <xsl:apply-templates select="." /> ?
3
by: Blaise Garant | last post by:
Hi I've made a stylesheet to transform my data into XSL-FO. This stylesheet used to work with MSXSL 4.0 but I've got some issues in ..NET. First, I changed removed all the "node-set()" function...
2
by: jimbo_vr5 | last post by:
Hey I think i've figured out the idea behind apply-templates. But going through the tutorial on <http://www.w3schools.com/xsl/xsl_apply_templates.asp> theres simply just something that i dont...
2
by: Ron | last post by:
Hello, I am trying to create a page that pulls class rosters from an SQLServer database. The roster table definition is: emp_id(pk, fk), sec_id(pk, fk), reg_date and reg_status. Status can be...
0
by: jdeleon0526 | last post by:
Hi All, I have datagrid with formated columns and I want to edit and save the changes interactively while viewing the grid. What am I my doing wrong or can you please correct my code below. ...
3
by: abhishek.smu | last post by:
Given an XML like: <root> <node>8</node> <node>21</node> <node>-7</node> <node>13</node> <node>43</node> <node>2</node> </root>
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.