Subject: Re: [xsl] queering data from another xml file From: David_N_Bertoni@xxxxxxxxx Date: Fri, 2 Nov 2001 14:34:04 -0500 |
> What I'm trying to do here is. While processing an XML file (MAIN.xml) with > XSL I need to pull data from another XML file (ACAD.xml) that depends on > content. > > @fileref is an attribute in the MAIN.xml file > @generated and @autocad attributes are in the ACAD.xml file > > if @fileref exists in the ACAD.xml I need to pull and use the @autocad > attribute if you change: document('ACAD.xml')/ACAD/Drawing/@generated=@fileref to: document('ACAD.xml')/ACAD/Drawing[@generated=@fileref] then the following will select the attribute: select="$mike/@autocad" or you could leave the variable alone, and just do the following: select="$mike/../@autocad" Which you do depends on your preference, I suppose. I'd prefer the first, as a matter of style, but I suppose it depends on what you're going to do with the variable. If there's only one condition for the xsl:choose, and you won't use the variable again, why not select the autocad attribute directly: document('ACAD.xml')/ACAD/Drawing[@generated=@fileref]/@autocad Hope that helps... Dave XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] queering data from anothe, Matthew L. Avizinis | Thread | RE: [xsl] queering data from anothe, Douklias, Mike JSIM |
Re: [xsl] queering data from anothe, Jörg Heinicke | Date | Re: [xsl] queering data from anothe, Mitch C. Amiano |
Month |