Subject: Re: Getting Entity File Names
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Wed, 22 Oct 2003 23:32:26 -0600
|
You can also use the following...
XML...
<?xml version="1.0"?>
<!DOCTYPE foo [
<!ENTITY foo-image SYSTEM "foo.jpg" NDATA JPEG>
]>
<foo>
<bar image="foo-image"/>
</foo>
XSLT...
<xsl:template match="/">
....
<xsl:value-of select="unparsed-entity-uri(/foo/bar/@image)"/>
....
</xsl:template>
This will return it in this format:
file:///C:/fileFolder/foo.jpg
Just use multiple substring functions to get just the file name without the
extension...
Best of luck,
M.
----- Original Message -----
From: "Michael Kay" <mhk@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, October 22, 2003 3:23 PM
Subject: RE: Getting Entity File Names
> XSLT 2.0 has a base-uri() function which gives you this information;
> there is an extension function in Saxon 6.5.x that gives it if you're on
> 1.0.
>
> Michael Kay
>
> > -----Original Message-----
> > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> > Betty Harvey
> > Sent: 22 October 2003 18:39
> > To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> > Subject: Getting Entity File Names
> >
> >
> >
> > I want to grab the filenames of where certain elements are
> > found. Is there anyway to do this with XSLT? For example,
> > below is a sample document:
> >
> > <!DOCTYPE foo [
> > <!ENTITY foo1 SYSTEM "foo1.xml">
> > <!ENTITY foo2 SYSTEM "foo2.xml">
> > ...
> > <!ENTITY foo900 SYSTEM "foo2.xml">
> > ]>
> > <foo>
> > &foo1;
> > &foo2;
> > ...
> > $foo900;
> > </foo>
> >
> > I would the output to say something like:
> >
> > <p>Found "myfoo" in file foo43</p>
> >
> > Betty
> >
> > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
> > Betty Harvey, XML Professional | Phone: 410-787-9200 FAX: 9830
> > Electronic Commerce Connection, Inc. |
> > harvey@xxxxxxxxxx | Washington,DC XML Users Grp
> > URL: http://www.eccnet.com | http://www.eccnet.com/xmlug
> > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
> >
> >
> >
> > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
> >
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- Re: Trying to read a parameter in the request in a XSL file, (continued)
- S Woodside - Sat, 4 Oct 2003 13:13:48 -0400 (EDT)
- Diodato, Anthony - Mon, 6 Oct 2003 14:05:19 -0400 (EDT)
- Betty Harvey - Wed, 22 Oct 2003 13:47:42 -0400 (EDT)
- Michael Kay - Wed, 22 Oct 2003 17:22:05 -0400 (EDT)
- M. David Peterson - Thu, 23 Oct 2003 01:33:07 -0400 (EDT) <=
- Betty Harvey - Thu, 23 Oct 2003 09:19:51 -0400 (EDT)
- David Carlisle - Thu, 23 Oct 2003 09:59:11 -0400 (EDT)
- Pramodh Peddi - Thu, 23 Oct 2003 11:09:23 -0400 (EDT)
- Pramodh Peddi - Thu, 23 Oct 2003 11:36:25 -0400 (EDT)
|
|