Re: Re: Re: [xml] mobile links for XInclude?



From Liam R. E. Quin  <liam holoweb net>
Date22 Jun 2003 14:26:18 -0400
In XInclude, no. But you can do something like this with XSLT,
if it helps.

I studied XSLT and didn't really like it. I fealt the framework was to
static (i.e. lacking dynamic xpath 
expressions, etc.). I was hoping that going to a lower API level (i.e.
LibXML) would give me the flexibility that 
XSLT lacked, while still sticking with a standard. But now that LibXSLT
suports all the nice EXSLT extensions, it 
might be an idea again. But I was really hoping to avoid having to load
up the XSLT python module along with 
LibXML2 every time... it might slow my scripts down... I guess I would
really like a pure libxml2 module solution...

You can also use relative URI references, of course:
<xi:include href="../../../program/python.xml....">...

The problem here is that the startup XML file (with all the XIncludes)
isn't parsed from the current directory, 
but is located using a system variable read by my python script... the
releative URI uses the current *working* 
directory as the reference point, not the XML source directory from where
the first XML file was parsed. I 
really would like a *movable* framework of interlinked XML files that can
be read from *anywhere* on the local 
system.

And, as Daniel says, you could use catalogs -- or maybe even an server
redirect!

XML catalogs do seem to be my best hope... I started reading up on them.
If I understand correctly, it seems 
that an XML catalog is basicly a DTD or series of processing instructions
(I coudn't really tell from the page I 
found) that "translates" an internal XML reference to an actual
file on the system. I guess this would be 
acceptable, in that, if my XML filetree moved, I would only have to rewrite
the references in the catalog. Have 
I understood this correctly?

Can anyone recommend a good 'dummies' page on learning to use XML catalogs
(preferably with complete and 
simple examples)?


Thanks,
Ben

This is your brain:
    bash-2.05$
This is your brain on drugs:
    Starting Windows XP...
Any questions?

250 business cards FREE! Create your own full-colour high-quality business cards easily online. Only at 
www.vistaprint.uk




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]