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

Re: Document processing order

Subject: Re: Document processing order
From: "Joseph L. Casale jcasale@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 7 Jul 2017 16:35:20 -0000
Re:  Document processing order
From: Michael Kay mike@xxxxxxxxxxxx [mailto:xsl-list-
service@xxxxxxxxxxxxxxxxxxxxxx]
Sent: Friday, July 7, 2017 9:52 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Document processing order

> I don't really see the problem, but that probably means I haven't
understood
> your explanation. Perhaps you could illustrate it with an example.

Hi Michael,
This relates to the sample I posted yesterday, given 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>

I create a template that matches Component elements where the child
File element has a specific Source attribute. That's simple, but then I need
to process the ComponentRef elements and omit any whose Id matches a
Component that I now have deleted.

I thought I could simply do something like;

  <xsl:template match="wix:Component[wix:File[substring(@Source,
string-length(@Source) - 4) = '.abcd]]
  </xsl:template>

and then generate an xpath query to select all ComponentRef elements whose
Id is orphaned which seems to work in my editor using xpath 2, but the
transform
is applied using xpath 1.

Thanks a lot for the help,
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.