Closed alexvanwoert closed 3 years ago
@alexvanwoert You’re on the right track here with identifying the problem. normalize-space()
cannot take in a sequence of more than one. It needs to be run first, before the other functions, and it needs to run on just one node at a time. For this, use simple map !
rather than the arrow operator =>
Got it! Thanks.
For the locations in the chapter I currently have:
This statement outputs at least 2/3 of the locations into alphabetical order with no repeats so I know the other functions are working correctly. The other 1/3 of the locations is definitely out of order at the end of the list because of the white spaces. I have tried:
and it stops outputting after Chapter 1 heading in the table. The problem is that normalize-space cannot handle more than one string like the other functions. When written without an inputted string as normalize-space() it uses the string value of the context node, in this case 'heading'.
This outputs the entire heading tag where I want the list of locations. Does anyone know how to use normalize-space in this context?