This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How to chunk to same dir where xml file is
- From: Janning Vygen <vygen at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 15 May 2002 11:48:07 +0200
- Subject: [xsl] How to chunk to same dir where xml file is
- Organization: Planwerk 6 /websolutions
- Reply-to: xsl-list at lists dot mulberrytech dot com
hi,
i like to split my xml files in many subdirectories, because i can
controll read/write acces with cvs on a per directory basis.
imagine files like this:
xml/book.xml
xml/chapter1/chapter-bar.xml
xml/chapter1/sect1-intro.xml
xml/chapter1/sect1-bla.xml
xml/chapter2/chapterfoo.xml
xml/chapter2/sect1foo.xml
xml/chapter2/sect1bar.xml
I use XInclude to connect between each other and using
libxml2/xsltproc and docbook-xsl stylesheets to transform them.
I modified the chunker from docbook to create a chunk filenames like
"xml/chapter1/chapter1.html". So everything is pushed in the right
directories.
The filename depends on the document structure. so all my "id" in the
component tags (chapter/sect1 etc) are combinded to find the
directory where to place the file.
I dont like it anymore :-) because it depends on that developers
naming there files like the ids and putting them in the right
directory
Is there a way to keep the url from xsl:document relative to the
original xml file?? I heard something about xml:base but maybe thats
a complete different story.
At least i think, that the xslt processor doesn't know anthing about
filesystem structure, right?
I would really like to say something like
xsltproc --stringparam rootid sect2-foo xml/book.xml
and if the tag <sect2 id="sect2-foo"> is in the file
xml/foo/bar/anyname.xml
the ouput file should be
xml/foo/bar/sect2-foo.html
Is this possible??
regards
janning
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list