[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

dynamically extending xslt

Subject: dynamically extending xslt
From: "Marco Plum" <m.plum@xxxxxxxxxxxx>
Date: Mon, 10 Oct 2005 14:27:37 +0200
extending xslt
Hi,

we are developing a new correspondence-system based on XML.
Our DTD is very similar to XHTML with some additional structures like
selections, iterations and variableplaceholders.
The composition of these documents will be realized as a
XSLT-stylesheet. I wrote a stylesheet wich transforms a document into a
XSLT-stylesheet.
This (produced) stylesheet will be used on a XML-file containing the
variablevalues and the data needed to resolve the logical
structures (e.g. selections etc.).

My problem is, that the user will be allowed to add elements to a
document, wich can contain anything allowed by the dtd.

An example:

<document>
  <body>
    <topic>
      <selection variable="aVariable">
        <item value="1">
          <textblock>some text</textblock>
        </item>
      </selection>
     </topic>
  </body>
</document>

This would be transformed into:

<document>
  <body>
    <topic>
      <xsl:choose>
        <xsl:when test="//variable[@name='aVariable'] = 1">
          <textblock>some text</textblock>
        </xsl:when>
      </xsl:choose>
    </topic>
  </body>
</document>


After this transformation the user is able to add another "topic" to the
document, which could contain another selection. And I need this new
content executed, after it is transformed into xslt.

One possible solution is to produce the stylesheet again, after the user
made his changes. But it has to be possible to "map" between the
stylesheet and the original document. I thought about the possibility of
using <xsl:include> but I didnt come to solution.

So what Im looking for, is a way, to dynamically extend an
XSLT-stylesheet...

Could "template reference" be a way to solve my problem? Any other ideas
are appreaciated!

Best regards,
Marco Plum

P.S. We are using XSLT 1.0 with MSXML on windows. But if possible, the
xsl should also work on XALAN (JAVA and IBM HOST)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.