Jump to content

In xslt how do I calculate a person height and display it in inches?


winkimjr2
 Share

Recommended Posts

I have an xml document with a person's height element. I am not sure how to use use xslt to transform this and display in inches.

For example if a person height is 5 foot 5 inches how do I display 65 inches using xslt? I know I need to multiply feet by 12 and then add the inches. But I am not sure how to do this.Here is my xml height element

<HeightFeet>5</HeightFeet><HeightInches>5</HeightInches>

The output I want should be 65 inches.

Link to comment
Share on other sites

In the value of element select attribute, you use an function, and operation: fn:number(node) * 13Click the check button on this post, if this help you.

Edited by L8V2L
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...