
Drat! I completely missed the hangout challenge, and I'm the one who has had trouble with GoogleHangingout in the past. Sigh. I was fighting with XPaths (eventually won) and completely forgot. Really sorry. 1) Can someone report how well or poorly the Hangout itself went? 2) Can someone report on the discussion on whether it should be called <dataNode> or something else? 3) In case anyone is interested, I was trying to write XSLT to identify all <div> elements that have a <gap> or <supplied> as a descendant *before* any text (other than whitespace), or a <gap> or <supplied> as a descendant *after* all text (other than whitespace). In the general case, it's harder than that, because you'd need to ignore the text inside <fw> and some <note>s and other things too, but I don't have any of those things in this dataset. What I eventually came up with is | <xsl:variable name="me" select="."/> | <xsl:variable name="first" select="( $me//gap | $me//supplied )[1]"/> | <xsl:variable name="last" select="( $me//gap | $me//supplied )[last()]"/> | <xsl:variable name="before" select="string-join( descendant::text()[ $first >> . ],' ')"/> | <xsl:variable name="after" select="string-join( descendant::text()[ . >> $last ] except $last//text(),' ')"/> | <xsl:variable name="no-txt-pre-first" select="normalize-space( $before ) eq ''"/> | <xsl:variable name="no-txt-post-last" select="normalize-space( $after ) eq ''"/> (I was using U+0D instead of U+20 just for debugging reasons -- it doesn't matter what character you join with, so long as it is one that is recognized by normalize-whitespace() as whitespace.) Feel free to show me it could have been done a lot easier ... :-) ---------
https://plus.google.com/hangouts/_/g374p6twebxmmcxkwkpgdgdciaa
Let's see if this works...