Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Radiobuttons in XML / XSL

    First: Sorry, my english is not the best, but I try to write as good as possible.

    My Path in .XML file:
    Code:
    <ClinicalDocument>
    <recordTarget>
    <patientRole>
    <rezeptgebuehrenbefreiung>ja</rezeptgebuehrenbefreiung>
    If in .XML file in
    Code:
    <rezeptgebuehrenbefreiung>
    is a yes, then the result should be:


    yes (radiobutton=checked) (radiobutton) no

    If in .XML in
    Code:
    <rezeptgebuehrenbefreiung>
    is a no, then the result should be:


    yes (radiobutton) (radiobutton=checked) no

    In my .XSL file it looks like this as far:
    Code:
    ...
    <xsl:variable name="rezeptgebbefr"> 
    <xsl:choose>
    
    <xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:rezeptgebuehrenbefreiung">
    
    <xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:rezeptgebuehrenbefreiung"/>
    
    </xsl:when>
    
    <xsl:otherwise>unspecified</xsl:otherwise>
    
    </xsl:choose>
    
    </xsl:variable>
    ...

    So, there should be two radiobuttons. One is checked, the other is NOT checked. Before the first button should be "yes" and after the second should be "no". The Problem is how I get here the correct radiobuttons..

    I don't know how I get the radiobuttons to the correct place. I tried different solutions of Google, but they also don't work.

    Maybe somebody can help me! Thank you very much!

    Greetings, Mario

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,316
    Thanks
    23
    Thanked 613 Times in 612 Posts
    This should be
    Code:
    <xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:rezeptgebuehrenbefreiung = 'Ja'">
    and I don't think you need the
    Code:
    <xsl:choose>
    or the
    Code:
    <xsl:otherwise>unspecified</xsl:otherwise>
    if your not making a choice.
    Last edited by Alex Vincent; 04-05-2014 at 03:04 AM. Reason: adding code tags
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #3
    New Coder
    Join Date
    Feb 2014
    Location
    USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think above code is write for radiobutton.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •