[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Looking at the XML under the hood of Word ... how to identify columnhead

  • From: Roger L Costello <costello@mitre.org>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Mon, 1 May 2023 17:04:33 +0000

Looking at the XML under the hood of Word ... how to identify columnhead

Hi Folks,

When I create a table in Word I want to explicitly indicate that “this cell is a column header”. See screenshot at bottom of this message.

 

You probably know that under-the-hood of Word is XML. I will be writing software to process the XML, so I need something in the XML which indicates that a cell is a column header. Bold-facing the first row of a table is a good visual cue to a human reader that the items in the row are column headers, but bold-facing is of no help to software.

 

I did some Googling and found this suggestion for indicating a column header: highlight the first row, right-mouse click, select Table Properties, click on the Row tab, select “Repeat as header row at the top of each page” and unselect “Allow row to break across pages”.

 

Okay, I did that and then examined the XML that was generated. See below for the XML of the first row of the table. As far as I can tell, the <w:tblHeader/> element is used to indicate “This row contains the column headers”. Do you agree? Does Word provide any other way to identify column headers? /Roger

 

<w:tr ...>
    <w:trPr>
        <w:cantSplit/>
        <w:tblHeader/>
    </w:trPr>
    <w:tc>
        <w:tcPr>
            <w:tcW w:w="0" w:type="auto"/>
        </w:tcPr>
        <w:p ...>
            <w:pPr>
                <w:rPr>
                    <w:b/>
                    <w:bCs/>
                </w:rPr>
            </w:pPr>
            <w:proofErr w:type="spellStart"/>
            <w:r w:rsidRPr="002C7789">
                <w:rPr>
                    <w:b/>
                    <w:bCs/>
                </w:rPr>
                <w:t>Vehicle_Type</w:t>
            </w:r>
            <w:proofErr w:type="spellEnd"/>
        </w:p>
    </w:tc>
    <w:tc>
        <w:tcPr>
            <w:tcW w:w="0" w:type="auto"/>
        </w:tcPr>
        <w:p ...>
            <w:pPr>
                <w:rPr>
                    <w:b/>
                    <w:bCs/>
                </w:rPr>
            </w:pPr>
            <w:r w:rsidRPr="002C7789">
                <w:rPr>
                    <w:b/>
                    <w:bCs/>
                </w:rPr>
                <w:t>Sensitivity</w:t>
            </w:r>
        </w:p>
    </w:tc>
</w:tr>

 

 

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.