Subject: Re: [xsl] converting Word dictionary to FLEx From: "Jim Albright jim_albright@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 27 Sep 2018 16:30:09 -0000 |
So my final solution ended up being totally different. I was trying to put all the content into an element but for my application which is to flatten the xml all I needed to do was to tag the first item and let the others pass through. See the <<< below My final output looks like \entry_number 00002 \lx a- \hm 1 \vernacular FALSE \co |ga a.f.|r /|ga i.a.|r verb \senseStart 1 \definition so, in order that perhaps \source D2 \senseStart \source Asp1.19 \source D2 \sectionHead Variant Forms: \variant ad- \co |ga a.f.|r /|ga i.a.|r verb \grammatical_info in 1|sup st|r person singular and third person plural \senseStart 1. so, in order that perhaps \startExample riI# ad-ftuI# <<< so here is where everything is bundled together. I didn't need to have all in one element. I just needed the flag StartExample and all following was included in example. \definition I want to go. \startExample ira a-t-ia:r \definition He wants to see it. Thank you Jim Albright -----Original Message----- From: Jim Albright jim_albright@xxxxxxxxxxxx [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: Tuesday, September 18, 2018 10:19 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] converting Word dictionary to FLEx Michael, I never looked at 3.0 so I will do that now. This is getting me much closer. Thanks for the heads up. I'll post solution when I get it done. Jim Albright (1) Firstly, I think you can use following-sibling::html:b rather than following::html:b, which is a much more contained search. (2) To stop the search at element X, the best solution in XSLT 3.0 is probably xsl:iterate <xsl:iterate select="following-sibling::*"> ... <xsl:if test="self::h:span[@class='Arial']"><xsl:break/></xsl:if> </xsl:iterate> xsl:iterate is basically like for-each except the order of processing is guaranteed and you can therefore break out as soon as a condition is satisfied; you can also pass data from one iteration to the next via parameters. Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] converting Word dictionar, Jim Albright jim_alb | Thread | [xsl] Performance of xsl:for-each w, Martynas Jusevičius |
Re: [xsl] Performance of xsl:for-ea, David Carlisle d.p.c | Date | [xsl] [ANN] Saxon 9.9, Michael Kay mike@xxx |
Month |