xsl-list
[Top] [All Lists]

Re: [xsl] Does the new structure include the same text content?

2021-01-22 09:51:26
On Fri, 2021-01-22 at 14:43 +0000, Bauman, Syd
s(_dot_)bauman(_at_)northeastern(_dot_)edu wrote:
Hear hear! (Even from DH & XML experts I have been told the data is
consistent, only to find it is not.)

One of my favorite pair of templates looks something like

  <xsl:template match="node()" priority="-12">
    <xsl:processing-instruction name="SBerr">If you loved me you
would have matched me! :-(</xsl:processing-instruction>

:-)

The Eddie2 tool i use generates such templates automaticlly, one for
each element in the input DTD (yes, DTD right now, not schema), that
produces an xsl:message with more information;  e.g.
  element wing has attribute is-broken=yes, value not allowed in target
DTD

But this can only catch unhandled elements, uncopied attributes.

A possible approach to checking the text might be to replace each text
string with a successive number, eg. [1] [2] and so on, before the
transform, and make sure all the numbers are present in the output.

I would do this process in separate transforms so it, too,  could be
checked.

-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

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