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

Structuring templates

Subject: Structuring templates
From: "Joseph L. Casale jcasale@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 1 Sep 2017 16:16:17 -0000
 Structuring templates
I am trying to split up a few large xsl templates where one contains a
large block of msxsl:script based C# functions. Almost all of the templates
use some quantity of the functions made available through this facility
as well as some quantity of shared variables for data like apostrophes,
quotes and some common names.

Ultimately I want most of the templates in their own file, I intend to import
these in a single file for my primary use case but use them individually
where
needed. Using import and include where it makes sense, this works fine for
the
variable template but not for the C# functions. I seem to only be able to
import
the template which defines the C# functions in just one file. Obviously that
only
works if I place the C# import in the final template which imports everything
but
that makes the individual templates useless.

The c# file resembles:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns:csharp="urn:csharp/functions"
                exclude-result-prefixes="msxsl csharp">

  <msxsl:script language="C#" implements-prefix="csharp">
    <![CDATA[ ... ]]>
  </msxsl:script>

</xsl:stylesheet>

The other templates have the same namespace structure. How can I make the
C# functions available in each template so they are usable on their own?

Thanks,
jlc

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.