Closed ajw120 closed 4 years ago
Hi @ajw120! I just realized I didn't push my code from today's class this evening, so I'll do that. In the meantime, though, the place you want to put <xsl:sort select="some XPath"/>
is inside an opened-up <xsl:apply-templates/>
, like this:
<xsl:apply-templates select="descendant::something">
<xsl:sort select="some XPath"/>
</xsl:apply-templates>
You want to do the sorting when you call apply-templates to process the nodes that you want to sort. I'll push my example from class today in a few minutes so you can see how it works and where I've placed the sort.
@ajw120 and class: I've just pushed my examples with this commit: https://github.com/ebeshero/DHClass-Hub/commit/30d4ef8fd81be5584c946eb1793893bab9b79d97
So I have started working on XSLT 6 and I figured out how to create links. But now I am currently stuck on as to where I am supposed to place the sequence in order to sort the table of contents. Everywhere that I place the sequence it comes up as an error. It basically tells me that the <
xsl:sort select="@number ! number()"/>
cannot be used there. I'm just stuck and confused.