understanding position() function in XSLT

Why does it skip the uneven numbers? Because while you were at the / level, you said: which applies templates to all nodes children of the root node, and (due to the built-in template rules) to all of their descendants – including the text nodes that separate the <a> elements. You will get a different result with an input of: … Read more

XSLT string replace

replace isn’t available for XSLT 1.0. Codesling has a template for string-replace you can use as a substitute for the function: invoked as: On the other hand, if you literally only need to replace one character with another, you can call translate which has a similar signature. Something like this should work fine: Also, note, in this example, I changed … Read more

XSLT equivalent for JSON

Interesting idea. Some searching on Google produced a few pages of interest, including: an outline of how such a “jsonT” tool might be implemented, and some downloads some discussion of that implementation a company which may have implemented something suitable Hope this helps.

How to fix error: The markup in the document following the root element must be well-formed

General case The markup in the document following the root element must be well-formed. This error indicates that your XML has markup following the root element. In order to be well-formed, XML must have exactly one root element, and there can be no further markup following the single root element. One root element example (GOOD) The most common sources … Read more

XSLT-FO for-each

Based on your update: since apparently you have no code to add for a Locations element, you could shorten your code by changing: to: and then doing: