xsl-list
[Top] [All Lists]

Get the XML File name in XSL?

2005-03-11 10:02:03
I have couple of questions:

1. Is there a way in XSL to get the name of the XML
file that it is currently transforming?  If yes, how?

2. Is there a way to get to the XML file name if its
included in another XML file via entities.  Let me
give you an example to make it a bit clear:

Lets say I have master.xml that includes (via
entities) 3 other xml files.  I am going to send the
master.xml and my XSL file to the transformer to
transform it to HTML.  Since the master.xml includes
all three files, as I am transforming each subfile, I
want to get the name of the subfile in XSL.  Is that
possible?

Here are example files:
I have master.xml file that looks something like this:
-------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE root SYSTEM "xml.dtd" [
    <!ENTITY % entFile SYSTEM "xml.ent">
    %entFile;
]>
<root>
  &subfile1;
  &subfile2;
  &subfile3;
</root>

My xml.ent file looks like this:
-------------------------------------------------
<!ENTITY subfile1 SYSTEM "11111.xml" >
<!ENTITY subfile2 SYSTEM "22222.xml" >
<!ENTITY subfile3 SYSTEM "33333.xml" >
-------------------------------------------------


Thanks for your help.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>
  • Get the XML File name in XSL?, c p <=