1
I have the following xml and I need to sort this xml using XSLT based on the value of
the "CONTENT_LENGTH" KEY ie. based on the attributes in the element <DOC_DETAIL
KEY="CONTENT_LENGTH" VALUE="14"/>
<?xml version="1.0" encoding="UTF-8"?>
<DOC_LISTS>
<DOC_LIST>
<DOC_URL>testurl4</DOC_URL>
<DOC_DETAILS>
<DOC_DETAIL KEY="TITLE" VALUE="Red Dragon"/>
<DOC_DETAIL KEY="LANGUAGE" VALUE="english"/>
<DOC_DETAIL KEY="CONTENT_LENGTH" VALUE="14"/>
</DOC_DETAILS>
</DOC_LIST>
<DOC_LIST>
<DOC_URL>testurl2</DOC_URL>
<DOC_DETAILS>
<DOC_DETAIL KEY="TITLE" VALUE="Hannibal Rising"/>
<DOC_DETAIL KEY="LANGUAGE" VALUE="english"/>
<DOC_DETAIL KEY="CONTENT_LENGTH" VALUE="7"/>
</DOC_DETAILS>
</DOC_LIST>
</DOC_LISTS>
What will be the sort select statement in <xsl:sort select=""/>?
感谢鲍勃。这已经解决了我的问题。 – askris4me
非常好,你会接受答案吗? –