xml:sort not supported? - InfoPath Dev
in

InfoPath Dev

xml:sort not supported?

Last post 05-16-2006 12:44 PM by Greg Collins. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-10-2006 07:32 PM

    • terash
    • Not Ranked
    • Joined on 05-11-2006
    • USA
    • Posts 2

    xml:sort not supported?

    xsl:sort not supported?
    Hiya, I have an infopath form that I am modifiying one of the views xsl files. I'm basically just trying to sort the order of values returned in InfoPath, however the problem occurs not when I open up the infopath document and check out the view, but when I export the document. Infopath tells me the attribute is not supported? Has anyone experienced this as well? I
  • 05-10-2006 11:26 PM In reply to

    • uma
    • Top 500 Contributor
    • Joined on 12-23-2005
    • Posts 35

    Re: xml:sort not supported?

    Hi,

    I think as Infopath says you are using xsl:sort as a attribute. But actually it is not a attribute. It is a element which is mostly used under the <xsl:foreach> element to sort the selected elements.

    To know more about the <xsl:sort> element visit the below given link.
    http://www.w3schools.com/xsl/xsl_sort.asp

    I hope, this will help you to solve your problem.
  • 05-16-2006 12:00 PM In reply to

    • terash
    • Not Ranked
    • Joined on 05-11-2006
    • USA
    • Posts 2

    Re: xml:sort not supported?

    Hi Uma, thanks for the response. I am somewhat aware of using xml:sort as an element, however here is the problem I am running into. I have an infopath form that uses 3 different views, an edit, filter and published view. The published view is the view I need to edit, there is a rich text field in the published view that once merged with other documents contains all the text from the field. I want to sort and then apply styles to the text.

    Here is a block of code from the xsl file.

    <xsl:template match="my:Story" mode="_4">
    <xsl:for-each select="my:Story">
    <xsl:sort selected="my:Story"/>
    <div class="xdRepeatingSection xdRepeating" title="" style="MARGIN-BOTTOM: 6px; WIDTH: 651px" align="left" xd:CtrlId="CTRL17" xd:xctname="RepeatingSection" tabIndex="-1">
    <div>
    <span class="xdTextBox " hideFocus="1" title="" xd:CtrlId="CTRL27" xd:xctname="RichText" xd:binding="my:company" xd:disableEditing="yes" tabIndex="-1" style="WIDTH: 640px; WHITE-SPACE: nowrap; WORD-WRAP: normal">
    <xsl:value-of select="my:company"/><br />
    </span>
    </div>
    <div><font style="bold">
    <span class="xdTextBox" hideFocus="1" title="" xd:CtrlId="CTRL25" xd:xctname="RichText" xd:binding="my:newslettertitle" xd:disableEditing="yes" tabIndex="-1" style="WIDTH: 640px; WHITE-SPACE: nowrap; HEIGHT: 20px; WORD-WRAP: normal">
    <xsl:value-of select="my:newslettertitle"/><br />
    </span>
    </font>
    </div>
    <div>
    <span class="xdRichTextBox" hideFocus="1" title="" xd:CtrlId="CTRL19" xd:xctname="RichText" xd:binding="my:newsbrief" xd:disableEditing="yes" tabIndex="-1" style="WIDTH: 100%; WHITE-SPACE: normal; HEIGHT: 50px">
    <xsl:copy-of select="my:newsbrief/node()"/><br />
    </span>
    </div>

    The problem is when I merge the fields it doesn#%92t apply a style nor does it sort correct…


  • 05-16-2006 12:44 PM In reply to

    Re: xml:sort not supported?

    xsl:sort is not natively supported in InfoPath. When you "roundtrip" your form (i.e. bring it into the designer, make a change, and save it again) the xsl:sort tag is either modified or stripped out, making it useless.

    The only way around this is to use a Preserve Code Block -- which means that InfoPath will pretty much leave your XSL code alone within that block.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.