[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] hard problem
Subject: Re: [xsl] hard problem From: Peter Flynn <pflynn@xxxxxx> Date: Mon, 02 Feb 2004 14:10:49 +0000 |
On Sun, 2004-02-01 at 16:31, Nikolas Nehmer wrote: > Hi, > > I have a really hard problem. Imagine you have a set of publications, > consisting of books, articles, PhDThesises,... all modeled in XML(and > corresponding XSD) files. All those publications have different > characteristics, like different elements,...Every publication class is > linked with a specialized XSL File for visualization purposes, for > example a book with an ISBN Number is displayed differnt from an > article,... Every publication is saved in it's own file. In other words, a normal document collection :-) > Now I want to create a list of all those publications without creating > an XSL file with too much overhead. $ find . -name '*.xml' -ls | awk 'BEGIN {print "<docs>"} {print "<doc>" $11 "</doc>"} END {print "</docs>"}' >doclist.xml $ saxon doclist.xml stylesheet.xsl doclist.html where stylesheet.xsl says something like <xsl:template match="doc"> <xsl:value-of select="document(.)//title[1]"/> </xsl:template> You may need to detect the type of document via the XSD in order to get the correct element holding the title, if they are named differently across document types. > In common object oriented > programming languages like Java I would say OK every Object in my list > knows how to visualize, so I just call every object's visualization > method and I have created the list. In effect, this is what the above does. > But unfortunately this is XML and > not Java ;-( Fortunately. > So far my list consisted of several Xlinks pointing to the publication > XML files. A specialized list.xsl file visualized those links and when > you klicked the links, the spezialized publication visualization opened. I think it's a bad idea to think of this from the idea of "visualization". You don't want to visualize these files, you want to extract some piece of data from them (the title). > But what I want to do now is to make something like to call the > publication's visualizer. In my opinion xlink:show="embed" would be a > very simple solution to my problem but as I know this function is not > implemented yet in browsers like Mozilla. Does anyone have some > suggestions? Maybe something like simulating the xlink:show="embed" > functionality on XSL level (in the list.xsl) could be a solution?! Think like a tree, not like a chainsaw :-) ///Peter XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: hard problem, Dimitre Novatchev | Thread | RE: [xsl] hard problem, Jim Fuller |
[xsl] is it a w3c standard that bro, Sebastian Fey | Date | [xsl] can one include/import XML da, Lars Huttar |
Month |