Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - doubt in xslt [Thread Next] Re: doubt in xsltTo: NULL Date: 5/5/2008 1:19:00 PM
"mobi" <mobeena.mobeena@g...> wrote in message
news:b22c7dfb-2131-47be-b050-6ddaec0b064a@h......
> hi
> i have a doubt
> i have an xml input file ,it contains a container,in that container it
> contains different parameters ,from that i want to write code
>
>
>
> xml code
> <container>
> <container:parametervalues>
> <container:enum>parameter1</container:enum>
> <container:value>data<container:value>
> <container:enum>parameter2</container:enum>
> <container:value></container:value>
> <container:int>parameter3</container:int>
> <container:value>3</container:value>
> <container:boolean>parameter4</container:boolean>
> <container:value>true</container:value>
> </container:parametervalues>
> </container>
>
> like this it contains 4 containers with same parameters with same or
> different values
>
> perl code
> if($parameter1!='data')
> {
> if($parameter2=' ')
> {
> print error
> }
> if($parameter3='3 ')
> {
> print error
> }
> }
>
> i wrote the xslt code like this but it not fetching the values
> properly
>
> xslt code
>
>
> <xsl:if test="DEF= '/container/parameter1'">
> <xsl:if test="VALUE != 'data'">
> <xsl:if test="DEF= ''/container/parameter2'">
> <xsl:if test="'VALUE' = ''">
> error:the value is not configured
> </xsl:if>
> </xsl:if>
> <xsl:if test="DEF= ''/container/parameter3'">
> <xsl:if test="'VALUE' = '3'"> error:the value is 3
> </xsl:if>
> </xsl:if>
> </xsl:if>
>
> now based on these codes i need in xslt
> the problem is not fetching the values properly
> i tried different methods but its not coming
> plz reply as soon as possible
As pointed out in the p2p.wrox.com forum, you need to explain the problem
more clearly with an example that uses well-formed XML etc.
--
Joe Fawcett (MVP - XML)
http://joe.fawcett.name
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
