[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xslt 2 when test multiple conditions

Subject: Re: xslt 2 when test multiple conditions
From: "Chris Papademetrious chrispitude@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 19 Aug 2023 13:35:56 -0000
Re:  xslt 2 when test multiple conditions
Hi Phil,

What is the simplest input XML and expected output XML that describes your
question, without using domain-specific elements (or at least not long
complicated ones)?

 - Chris



On Sat, Aug 19, 2023 at 9:22b/AM LEGAULT, PHILLIP plegault@xxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> I do understand that this is entirely volunteer response on your part.
>
> I totally appreciate any help I receive from this group, and I donbt take
> it for granted that I will receive an answer that will solve my problem.
>
> Simply put.
>
> If QuestionnaireIdentifier_GCC__c = Safety_MedicalAE Questionnaire,  and
> DSMapping_GCC__c = Indication, return Response_GCC__c
>
>
>
>
>
>
>
> *From:* Chris Papademetrious chrispitude@xxxxxxxxx <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
> *Sent:* Saturday, August 19, 2023 9:11 AM
> *To:* xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> *Subject:* [EXTERNAL] Re:  xslt 2 when test multiple conditions
>
>
>
> Hi Phil,
>
>
>
> It requires extra effort on our part to understand your namespaces,
> element purposes, and so on. And most people here are volunteering their
> time, so we try to avoid spending extra effort for a one-time understanding
> that no longer matters when the question is answered. I know including
> extra information seems like it's helping us, but it's actually making it
> more difficult.
>
>
>
> Somewhere underneath your real-world application question is an XSLT
> programming question - perhaps something about one element taking
> precedence over another in a template match, or something like that. Can
> you distill down your question into a simple scenario (such as with <A>,
> <B>, and so on), removing any elements/attributes/aspects that are not
> relevant to your programming question?
>
>
>
>  - Chris
>
>
>
>
>
>
>
> On Fri, Aug 18, 2023 at 4:08b/PM LEGAULT, PHILLIP plegault@xxxxxxxxxx <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>
>
> I have an xml file with answers to multiple questionnaires. When one of
> the questionnaires <Safety_MedicalAE Questionnaire> has answered the same
> question different from on of the other questionnaires I need the
> Safety_MedicalAE Questionnaire response without the others.
>
>
>
> Example
>
>
>
> <records xsi:type="sf:Response_GCC__c">
>
>          <sf:Id xsi:nil="true"/>
>
>          <sf:Question_GCC__c>Why was the patient using the
> product?</sf:Question_GCC__c>
>
>          <sf:QuestionnaireQuestion_GCC__r
> xsi:type="sf:QuestionnaireQuestion_GCC__c">
>
>             <sf:Id xsi:nil="true"/>
>
>             <sf:DSMapping_GCC__c>Indication</sf:DSMapping_GCC__c>
>
>             <sf:Questionnaire_GCC__r xsi:type="sf:Questionnaire_GCC__c">
>
>                <sf:Id xsi:nil="true"/>
>
>
> <sf:DownstreamSystemName_GCC__c>Safety</sf:DownstreamSystemName_GCC__c>
>
>                <sf:QuestionnaireIdentifier_GCC__c>Safety_MedicalAE
> Questionnaire</sf:QuestionnaireIdentifier_GCC__c>
>
>             </sf:Questionnaire_GCC__r>
>
>          </sf:QuestionnaireQuestion_GCC__r>
>
>          <sf:Response_GCC__c>rash</sf:Response_GCC__c>
>
>       </records>
>
>
>
>       <records xsi:type="sf:Response_GCC__c">
>
>          <sf:Id xsi:nil="true"/>
>
>          <sf:Question_GCC__c>Why was the patient using the
> product?</sf:Question_GCC__c>
>
>          <sf:QuestionnaireQuestion_GCC__r
> xsi:type="sf:QuestionnaireQuestion_GCC__c">
>
>             <sf:Id xsi:nil="true"/>
>
>             <sf:DSMapping_GCC__c>Indication</sf:DSMapping_GCC__c>
>
>             <sf:Questionnaire_GCC__r xsi:type="sf:Questionnaire_GCC__c">
>
>                <sf:Id xsi:nil="true"/>
>
>
> <sf:DownstreamSystemName_GCC__c>Safety</sf:DownstreamSystemName_GCC__c>
>
>                <sf:QuestionnaireIdentifier_GCC__c>Safety_Medical_FULL
> Questionnaire</sf:QuestionnaireIdentifier_GCC__c>
>
>             </sf:Questionnaire_GCC__r>
>
>          </sf:QuestionnaireQuestion_GCC__r>
>
>          <sf:Response_GCC__c>cough</sf:Response_GCC__c>
>
>       </records>
>
>
>
>
>
> I have tried
>
>
>
> <xsl:choose>
>
> <xsl:when
>
test="/records/sf:Case_Responses_GCC__r/records/sf:QuestionnaireQuestion_GCC_
_r/sf:Questionnaire_GCC__r[sf:QuestionnaireIdentifier_GCC__c='Safety_MedicalA
E
> Questionnaire']/../sf:DSMapping_GCC__c='Indication'">
>
>   <xsl:value-of
>
select="/records/sf:Case_Responses_GCC__r/records/sf:QuestionnaireQuestion_GC
C__r[sf:DSMapping_GCC__c='Indication']/../sf:Response_GCC__c"/>
>
> </xsl:when>
>
>     <xsl:otherwise>
>
>       <xsl:value-of
>
select="/records/sf:Case_Responses_GCC__r/records/sf:QuestionnaireQuestion_GC
C__r[sf:DSMapping_GCC__c='Indication']/../sf:Response_GCC__c"/>
>
>     </xsl:otherwise>
>
> </xsl:choose>
>
>
>
>
>
> However, I get both responses rash cough
>
>
>
> Thanks in advance for your help.
>
>
>
>
>
> *Phil Legault*
>
> RDx Platform Lead
>
>
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3519310> (by
> email)
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3514465> (by
> email)
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3519310> (by
> email <>)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.