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

Re: Does the new structure include the same text conte

Subject: Re: Does the new structure include the same text content?
From: "Dave Pawson dave.pawson@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Jan 2021 15:58:51 -0000
Re:  Does the new structure include the same text conte
KISS principles?
 Usually, if I know the element, ns, parent I can find the offending
input element that I've omitted.

 <xsl:template match="*">
  <xsl:message>
    *****<xsl:value-of select="name(..)"/>/{<xsl:value-of
select="namespace-uri()"/>}<xsl:value-of select="name()"/>******
    </xsl:message>
</xsl:template>

I've not needed to bother with @x   ymmv

HTH

On Fri, 22 Jan 2021 at 15:51, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, 2021-01-22 at 14:43 +0000, Bauman, Syd
> s.bauman@xxxxxxxxxxxxxxxx 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
> 
>


-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.

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.