Custom Scorecard

15 views
Skip to first unread message

minesadorada

unread,
Apr 22, 2012, 4:38:46 AM4/22/12
to golf-marku...@googlegroups.com
I am trying to display a custom blank scorecard with Stableford allowances for each hole based on a golfml file.

In a golfml Course file, I added in a player section player 'Bob':
...
    </golf-course>
    <player gender="male">
      <name>Bob</name>
      <date-of-birth>2000-01-01</date-of-birth>
      <current-handicap handicap-system="USGA">26.2</current-handicap>
    </player>

I then edited Bob in the params section of custom-scorecard.xsl:
        <xsl:param name="golfer.name">Bob</xsl:param>
        <xsl:param name="golfer.birthdate">2000-01-01</xsl:param>
        <xsl:param name="country-club.name">Abama Golf and Spa resort</xsl:param>
        <xsl:param name="country-club.golf-course.name">Main Course</xsl:param>
        <xsl:param name="tee-set.name">Regular</xsl:param>
        <xsl:param name="personal-par">yes</xsl:param>

I expected the stylesheet to pick up Bob's <current-handicap> from the golfml file.

Some questions (I hope they are not too obvious!)

1 ) Is altering the stylesheet params the only way to produce a custom scorecard for 'Bob'?  Is there a way to avoid editing the stylesheet?
2 ) What did I do wrong to produce the 'NaN' in the handicap display?
3 ) Is the scorecard intended to display the Stableford allowances in the 'Allowed' row?
4 ) How could I get the stylesheet to display more than one player?

The static-course stylesheet works very well


Reply all
Reply to author
Forward
0 new messages