sudheer2250 0 Light Poster


I am applying transform to a input xml file using the following code.

//Applying transform for the input word xml file.
                    XslTransform myXslTransform;
                    myXslTransform = new XslTransform();
                    myXslTransform.Transform("C://Target.xml", targetpath);

In the XSLT file, wrote for displaying attributes as

<xsl:attribute name="label">
              <xsl:value-of select="$level"/>

            <xsl:attribute name="externalid">
              <xsl:value-of select="$externalid"/>
            <xsl:attribute name="displayorder">

            <xsl:attribute name="type">

But in the output XML the attributes are displaying in the following order...

-<Mynode displayorder="0" label="label" questiontype="Question" externalid="extnid"></Question>


When i runt the XSLT to the XML file from the 'Visual studio->XML->StartWithoutDebugging'
menu in visual studio 2010..i am getting the attributes order correctly as i mentioned in the XSLT file as below...

<Mynode label="label" externalid="extnid" displayorder="0" questiontype="Question">

I did not understand what is the problem.....Please help me any one...I am struct with this problem from past 3 days..

Thanks in advance...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.