Descriptors FAQDebugging Descriptors can be difficult unless you are knowledgeable in the underlying technologies, including XSL, Servlets and SOAP. Some of the most common problems and their solutions are summarized below.
How do I create a Descriptor? Use the Create Descriptor Using Wizard task on the Descriptor Management page. How do I execute an iTQL command? There are two ways to execute an iTQLTM command:
See the iTQL Reference Guide for more information. How do I deploy the built-in Descriptors? Use either the Deploy Descriptors or Redeploy Descriptors task on the Descriptor Management page. The Redeploy Descriptors task completely removes all Descriptors before redeploying the built-in ones, while the Deploy Descriptors task deploys the built-in Descriptors and preserves the existing Descriptors. How do I deploy my Descriptor? The RDF embedded in the Descriptor XSL file needs to be loaded into a model in a KowariTM database, using the following steps:
Note - The location of the Descriptor must be readable by the Kowari server. For systems running a Windows® operating system, the file specification looks something like If there are no errors in the XSL, then the Descriptor is deployed and available for use. Otherwise, check your XML for bad syntax, such as unclosed tags. The Create Descriptor Using Wizard task generates correct XML and XSL. Note - When invoking the Descriptor from a client (SOAP, Java or another Descriptor), you must use the exact URL used to load the Descriptor. That is, you cannot load a Descriptor using a If a Descriptor is to be used from a web server, then it should be loaded with a HTTP URL after it has been put on the web server. For example, if the file in the example above was on a web server in the work directory load <http://foo/joe/work/helloworld.xsl> When Descriptors are deployed as HTTP URLs, they are accessible by any client with HTTP access, including any on the Internet, provided they have access through a firewall. I can't invoke my Descriptor. First, check that the Descriptor model exists on the Kowari server. If it does, then check that the Descriptor is deployed in the Descriptor model. If you changed anything from the time when you deployed it using the Create Descriptor Using Wizard task, then you have to redeploy the built-in Descriptors and redeploy your Descriptor. How do I check that the Descriptor model exists on a Kowari server? There are two ways to check if the Descriptor model exists:
Note - In the above command, replace This query returns all models on the server. If there is no How do I check if my Descriptor is deployed? Descriptors must be deployed before use. The Kowari code that invokes a Descriptor looks up the parameters that a Descriptor uses, as well as other information, before it invokes the Descriptor. If the Descriptor has not been deployed, then the code does not know how to invoke it and fails. First, make sure that the built-in Descriptors are deployed. Then select the List of Descriptors Available on this Host task from the Descriptor Management page. What is the life cycle of a Descriptor? When a Descriptor is first invoked, the Descriptor code retrieves the Descriptor from its URL and creates a java object representing that Descriptor. For the first invocation only, the XSL transformer processes the XSL stylesheet into an internal form and places it in a free pool for use. When used, it is placed in a busy pool until it has performed its duty, then returned to the free pool. If a client requests a Descriptor and an instance is already in the busy pool, a new instance is created and made available. Eventually, both Descriptors are returned to the free pool. The pool grows to the size needed and stays that size. It is not expected that these pools will get very large, especially in comparison to resources on a Kowari server. How do I empty the Descriptor cache? Use the Purge all Cached Descriptors Available on this Host task from the Descriptor Management page. I've changed my Descriptor XSL code but when invoked it does not notice my changes. Descriptors are downloaded and processed into JavaTM Objects that are cached and reused. If you have changed the logic in a Descriptor but not the parameters or mime type (that is, everything specified with the Create Descriptor Using Wizard task) then you need to clear the Descriptor cache using the Purge All Cached Descriptors Available on this Host task from the Descriptor Management page. If you have added or removed a parameter or mime type then you will need to redeploy your Descriptor. If the Descriptor is on a web server, check that you have published it to the web server. My Descriptor doesn't work. Where are errors logged? The file 'Can't have more than one ROOT in a DOM !' or 'org.w3c.dom.DOMException: DOM006 Hierarchy request' Errors. This happens when calling one Descriptor from another. The called Descriptor returns XML with more than one root, and if you try and store this in a variable, or pass it to something expecting a single root, this error returns. For example, Descriptor A returns: <price>17.55</price> Descriptor B calls Descriptor A and tries to store the result in a variable, but cannot because the XML is not in a tree. Descriptor A needs to return something similar to: <cd> The XML now has one root. This can also happen when there is some text after a node. For example: <price>17.55</price> In this case, there is an invisible text node that needs outer If Descriptor B calls Descriptor A and Descriptor C (similar to Descriptor A) and simply copies their results to the output stream, then there are now two root nodes. As stated previously, you need to put a tag around where the two Descriptors are called. Can I see how other Descriptors work? Can I get their source? Yes. Download them with a web browser or some other mechanism. The List of Descriptors Available on this Host task from the Descriptor Management page allows you to list Descriptors available on your host or other hosts. The list of Descriptors also includes links to download the Descriptors. Note - Some web browsers have trouble displaying the Descriptor. If this is the case, right-click on it and choose the option to download the link directly. Some links to local Descriptors with file URLs, such as How do I store the result of a Kowari command in a variable? Use the following example as a guide. <xsl:variable name="answer"> How do I store the returned data from a Descriptor invoked from another Descriptor? Use the following example as a guide. <xsl:variable name="answer"> What is the 'Can not convert TREEFRAG into NodeSet' error? The Tree fragment must be converted into a NodeSet using a XALAN extension. See the next question for more information. How do I apply the current stylesheets rules to XML returned from a query or another Descriptor? XSL does not directly allow for this and a XALAN extension must be used. The XML must be converted from a Tree fragment to a proper DOM NodeSet. To apply XML to the stylesheet, use the following example as a guide. <xsl:variable name="answer"> How can I see the raw XML result from a Kowari command? Copy the result to the output stream as follows: <xsl:variable name="answer"> If you are viewing the response in a web browser, the XML tags may not be visible, so wrap them in <!-- Now apply the templates to the answer --> Why are some XSL parameters or variables written like $model and some like {$model}? When referring to a parameter from an element in the XSL namespace, it is sufficient to refer to it using a dollar sign ($) prefix. For example: <h1><xsl:value-of select="$title"/><h1> However when referring to parameters from any other namespace they must be surrounded with braces ({}). For example: <xhtml:a href="{$homepage}">Home Page</xhtml:a> Even when using no namespace, braces ({}) must be used. For example: <a href="{$homepage}">Home Page</a> |
Latest NewsKowari 1.1.0 Pre-release 1 Released ![]() ![]() |
||||||
© 2001-2004 Tucana Technologies, Inc. Some rights reserved. |