Hi -
I think when you say the preceding "/" disappears you may be talking about the difference in the formula editor window between InfoPath's "friendly" display and the full XPath - in the form you attached, if I select the Edit XPath checkbox, I can see that the "/" is still there.
So - your check out button, you are setting the page url query parameter in the "Check Out" data connection. But then you query the "Check In" data connection. Then you have a button you've labeled with "Check In", but it doesn't set the query parameters in the "Check In" data connection - it just executes it. Looks like instead of using the template part, you've tried to just repurpose the buttons I'd added to your form for testing?
Oh, wait, looks like you have different actions on these buttons in different views? So, in the Switchboard view, your button labelled "Execute Query (Check In)" sets the page url query parameter for the "Check In" data connection, but doesn't execute the data connection? And your other button sets the correct page url query parameter, but executes the wrong data connection.
To check out - you need to set the query parameters in the Check Out data connection and execute the Check Out query.
To check in - you need to set the query parameters in the Check In data connection and exectue the Check In query.