XSLT Solution Explanation 1 Note: Read the Interpreting XPath section for more information about resolving XPATH expressions.
The XPATH expression in the match statement selects the <value> element as the context node because it is the child named "value"of the element named "add-attr" whose attribute named "attr-name" has a value of "phone". Then the XPATH expression "child::text()" selects the value of all text nodes on the child axis of the context node. The only child of the value element is thus selected and its value "333-333-3333" is sent to the translate function where its hyphens are replaced by dots. The translate result is outputted to the output document by the "value-of" XSLT instruction.
|
|||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||