Skip to content

How does array:sort work for an array of element nodes? #666

@martin-honnen

Description

@martin-honnen

I am surprised by the result of the query array { //tip } => array:sort() in the playground:

Array with 3 items:<tip id="edit">You can edit everything on the left</tip><tip id="examples">You can access more examples from a menu in the top right</tip><tip id="permalink">Another button there lets you share your test using an URL</tip>

Should the result not be

Array with 3 items:<tip id="permalink">Another button there lets you share your test using an URL</tip><tip id="examples">You can access more examples from a menu in the top right</tip><tip id="edit">You can edit everything on the left</tip>

?

Or how does array:sort in FontoXPath work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions