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

Re: external files

Subject: Re: external files
From: Mulberry Technologies List Owner<xsl-list-owner@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Jul 2001 18:48:27 -0400
fileref call servlet
>From: "Robert Koberg" <rob@xxxxxxxxxx>
>To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
>References: <236CA276C223D5118D9F00D0B73E811E054892@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
>Subject: Re:  external files
>Date: Wed, 11 Jul 2001 07:55:27 -0700
>MIME-Version: 1.0
>
>this is off the top of my head - no testing - hopefully it will give you the
>info you need - should work...
>_______________________________
>
>config.xml -- some sample XML
>-----------------------
><folder name="" id="root">
>   <page id="index_en_us">
>      <xml filref="boo_en_us.xml"/>
>   </page>
>   <page id="index_en_uk">
>      <xml filref="boo_en_us.xml"/>
>   </page>
>   <page id="index_es_la">>
>      <xml filref="boo_en_us.xml"/>
>   </page>
>   <folder name="products" id="etc...>
>      <folder name="thiskindofproduct">
>        etc...
>      </folder>
>   </folder
></folder>
>--------------------------------------------------
>wrapper.xsl -- I send down the page ID as a parameter from a servlet (but
>there are other ways) and transform the above XML with the below XSL:
>
><xsl:param name="page-id"/>
>
><!-- select all so you can build path to page from folder names -->
><xsl:template match="//*">
>   <xsl:variable name="path">
>       <xsl:call-template
>name="get-path-to-file-from-ancestor-folder-names-or-however">
>            <xsl:with-param name="page-id" select="$page-id"/>
>       </xsl:call-template>
>   </xsl:variable>
>   <xsl:apply-templates select="page[@id=$page-id]">
>        <xsl:with-param name="$path" select="$path"/>
>   </xsl:apply-templates>
></xsl:template>
>
><xsl:template match="page">
>    <xsl:param name="path"/>
>       <xsl:apply-templates select="document(concat($path,xsml/@fileref)"/>
></xsl:template>
>
><xsl:template match="root-of-pulled-page">
>   <html>
>   blah blah
>   </html>
></xsl:template>
>--------------------------------
>
>hth,
>Rob
>
>----- Original Message -----
>From: "Mike Lamb" <m@xxxxxxxxxxxxxxxxxxxxx>
>To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
>Sent: Wednesday, July 11, 2001 6:35 AM
>Subject:  external files
>
>
>> Thanks all for your comments. I think I can simplify my inquiry:
>>
>> I need to be able to import an XML file specified in my source document
>and
>> process it using templates in my ORIGINAL xsl file. I suspect that the
>> document() function allows me to do exactly this, but I am very unclear on
>> the mechanics. Any thoughts on this simplified problem?
>>
>>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>>


-- 
======================================================================
B. Tommie Usdin                        mailto:btusdin@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com  
17 West Jefferson Street                           Phone: 301/315-9631
Suite 207                                    Direct Line: 301/315-9634
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML              
======================================================================

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • external files
    • Mike Lamb - Wed, 11 Jul 2001 09:40:59 -0400 (EDT)
      • <Possible follow-ups>
      • Mulberry Technologies List Owner - Wed, 11 Jul 2001 18:55:11 -0400 (EDT) <=

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.