XSLT Export Filter produces unnecessary empty XML tags -


i'm using xslt export filter export part of openoffice calc spreadsheet xml file.

one part of filter uses xls:for-each iteration because there can different amount of entries every time script run. iteration produces empty xml tags after ones content.

the calc sheet looks this: http://imgur.com/a/alpx2 (rows , b can contain flexible amount of data)

the xslt export filter looks this: http://pastebin.com/ugw9cusw

and result looks this: http://pastebin.com/hiyxfray

i had idea add kind of xsl:if, wasn't able combine notion on select="table:table-row[n]/table:table-cell[m]".

so maybe has idea causes empty xml tags or how rid of them?

i think need start xpath tutorial learn how write predicates, instance changing <xsl:for-each select="table:table-row[position() &gt; 1]"> <xsl:for-each select="table:table-row[position() &gt; 1][table:table-cell]"> process table-row elements having table-cell child elements or <xsl:for-each select="table:table-row[position() &gt; 1][table:table-cell[normalize-space()]]"> process table-row elements having non-empty table-cell child elements.

i can't tell screen-shot of spreadsheet application right condition input xml data can @ xml , adapt code.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -