xml - Omitting a number in XSLT -
part of xml have file is:
<global> <globalparam name="rollname" value="scene" 10:00:00:00" /> <globalparam name="tapeorg" value="10:00:00:00" /> <globalparam name="readstart" value="00:00:00:00" /> <globalparam name="readduration" value="00:02:05:09" /> </global>
currently xsl doesn't handle in field , follows:
<xsl:template match="globalparam"> <globalparam> <xsl:attribute name="name"> <xsl:value-of select="@name" /> </xsl:attribute> <xsl:attribute name="value"> <xsl:value-of select="@value" /> </xsl:attribute> </globalparam> </xsl:template>
this fine but, sofware outputs if reprocesses file it(as can see above adds 10:00:00:00 file name , xml file , need remove both can handle output filename when translation .
what need remove 10:00:00:00"
roll name field keep name intact looking @ xslt schema , can't find appropriate function handle this. not experienced xslt , can remove field alltogether , doesn't me.
is there way possibly excluding number if finds or , space between name , time section?.
any insight great
thanks.
you need apply pre-processing input file. if using .net can use code remove 10:00:00:00"
.
var result = regex.replace(input, @"(?s)(?<!=""\s*)10:00:00:00""", string.empty);
regex (?s)(?<!="\s*)10:00:00:00"
find 10:00:00:00"
doesn't have ="
in prefix.
Comments
Post a Comment