are you sure that the (your) line should look like
<xsl:template match="*[normalize-space( concat(.,@*) )='']"/>
and not like
<xsl:template match="@*[normalize-space( concat(.,@*) )='']"/>
Mind the @
I am quite sure I meant to match elements, not attributes, with that
template. I am not at all sure that's what you want, though :-)
I, for one, would probably find it easier to figure out the desired
behavior, here, if you posted a test file input and output. E.g., what
should the output be if the input is
<?xml version="1.0" encoding="UTF-8"?>
<wrapper>
<!-- elements w/o content -->
<outer></outer>
<outer maybe=""></outer>
<outer maybe="a"></outer>
<!-- elements w/ PCDATA content -->
<outer>b</outer>
<outer maybe="">b</outer>
<outer maybe="b">b</outer>
<!-- elements w/ an empty child element -->
<outer><inner/></outer>
<outer maybe=""><inner/></outer>
<outer maybe="c"><inner/></outer>
<!-- elements w/ a child element that has PCDATA content -->
<outer><inner>d</inner></outer>
<outer maybe=""><inner>d</inner></outer>
<outer maybe="d"><inner>d</inner></outer>
<!-- empty comment -->
<!---->
<!-- PIs -->
<?syd the next PI is empty?>
<?syd?>
</wrapper>
(There may be situations I haven't taken into account for you, here:
it's the idea that counts.)
Note that Michael has since pointed out that the "concat(.,@*)"
construction (which I just copied from somewhere else in the
discussion) does not do what I thought it did. See
http://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/200912/msg00138.html.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--