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

Re: queering data from another xml file

Subject: Re: queering data from another xml file
From: David_N_Bertoni@xxxxxxxxx
Date: Fri, 2 Nov 2001 14:34:04 -0500
acad attributes
> 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

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.