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

Xpath conditional

Subject: Xpath conditional
From: "Joseph L. Casale jcasale@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 6 Jul 2017 17:26:10 -0000
 Xpath conditional
Hi have some XML resembling the following:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <DirectoryRef Id="WEBSITEDIR">
            <Component Id="cmpCA929998DABB546D9DBF11366AF00C73" Guid="*">
                <File Id="fil621D71236777E77CBCD8796C747EFDFF" KeyPath="yes"
Source="$(var.MyVar)\Global.asax" />
            </Component>
            <Component Id="cmp431AD7A30B0DC39715871007A26AE68B" Guid="*">
                <File Id="fil24F96AF9459A0FF6768697EEBAAA4133" KeyPath="yes"
Source="$(var.MyVar)\load.aspx" />
            </Component>
        </DirectoryRef>
    </Fragment>
    <Fragment>
        <ComponentGroup Id="WebsiteComponents">
            <ComponentRef Id="cmpCA929998DABB546D9DBF11366AF00C73" />
            <ComponentRef Id="cmp431AD7A30B0DC39715871007A26AE68B" />
        </ComponentGroup>
    </Fragment>
</Wix>

How can I generate a match expression for a template that selects
the ComponentRef whose @Id equals the enclosing Component @Id
which wraps a File element with a known @Source.

In this simpler cases, a query predicate that doesn't have the nested
conditional is trivial however in this case I am clear how to write this.

At runtime, I will only know the Fle/@Source value and need to map
this back to a ComponentRef element.

Thakns,
jlc

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.