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

Re: Table structure checking, how?

Subject: Re: Table structure checking, how?
From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 7 Mar 2016 20:04:34 -0000
Re:  Table structure checking
Hi again,

I should have continued to read to the end of the thread, which makes
me wish to stress my solution is perhaps worth looking at *if only for
comparison purposes with others* -- where it might show we have
approached things similarly, for example.

Cheers, Wendell


On Mon, Mar 7, 2016 at 2:57 PM, Wendell Piez wapiez@xxxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Michael,
>
> Take a look here:
>
> https://github.com/wendellpiez/JATSPreviewStylesheets
>
> (If you have trouble seeing it let me know.)
>
> In particular you can see code inside the Schematron branch, although
> you will also need the XSLT branch.
>
> Its approach is to create a normalized expanded version of the table
> against which rules can be checked. Then your actual table elements
> (rows and cells) can refer into the expansion, as a kind of map. (So,
> the Schematron can call XPath as supplemented by XSLT.) This includes
> indicators of cell row and column coverage as well as creation of the
> ghost table cells that are a notable feature of OASIS/CALS tables.
>
> If nothing else this may be worth looking at. You may need to tweak
> your settings in Schematron to allow-foreign elements (for the XSLT
> bits).
>
> Enjoy,
> Wendell
>
>
>
>
> On Thu, Mar 3, 2016 at 3:38 AM, Michael MC<ller-Hillebrand
> mmh@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> Hi folks,
>>
>> We came across a CALS table with a "missing" cell in the first row, like
this:
>>
>> <tgroup cols="2">
>>   <tbody>
>>     <row>
>>       <entry colname="col1" morerows="1"><p>Text</p></entry>
>>       <!-- MISSING second column cell -->
>>     </row>
>>     <row>
>>       <!-- skipped first cell because of morerows -->
>>       <entry colname="col2"><p>Text</p></entry>
>>     </row>
>>   </tbody>
>> </tgroup>
>>
>> This table is technically valid, but creates problems when processed
further.
>>
>> Are you aware of a tool or method to check that the table data is correct
regarding any available colspan or rowspan definitions? I fear there is no way
to have that checked using just e.g. XPath.
>>
>> My next step would be to look at Andrew Welch's table normalizer, which I
have used in a number of projects. It is currently based on the assumption
that the first row of a table is complete (after expanding any colspan
definitions).
>>
>> http://andrewjwelch.com/code/xslt/table/table-normalization.html
>>
>> Any hints are very welcome,
>>
>> - Michael
>>
>
>
>
> --
> Wendell Piez | http://www.wendellpiez.com
> XML | XSLT | electronic publishing
> Eat Your Vegetables
> _____oo_________o_o___ooooo____ooooooo_^
>



--
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^

Current Thread

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
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.