XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + XSLT transformation problem (2)
-> + Flat To nested XML using Keys (3)
-> - XSLT Editor autocomplete funct... (1)
-> - Receiving an argument from a l... (1)
-> + Can't using the Xalan-J in Sty... (2)
-> + Need help testing to see if th... (2)
-> + Any good way to handle repeati... (2)
-> - Renaming child element name wh... (1)
-> + What to do to only how last 4 ... (2)
-> + Help to access an element with... (3)
-> - Multiplication for-each (1)
-> - XSL / X-Path query (1)
-> - Help in creating XSD (1)
-> + JAVASCRIPT Inside XSL (2)
-> + is at possible to create edita... (2)
-> + Grouping on Multiple Field (2)
-> + XSLT 1.0 Grouping Small change... (2)
-> + Revision bar based on the page... (2)
-> + xslt to rtf (2)
-> + XEP/FOP Error (3)
-- Previous [181-200] [201-220] [221-240] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Posttop
Paul ZammitSubject: XSLT Editor autocomplete functionality
Author: Paul Zammit
Date: 21 Jun 2010 02:31 PM
I'm new to SS and I am simply trying to become familiar with the XSLT editor. The XML document I'm working with has multiple namespaces on the root element. When working in the editor, the auto-complete feature seems to have problems identifying elements.

Here's an example xml document:
<?xml version="1.0" encoding="ISO-8859-1"?>
<catalog xmlns="http://www.mycompany.com/abc/xml/"
xmlns:def="http://www.mycompany.com/def/xml/">
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
<def:genre>
<def:code>xyz</def:code>
<def:type>Blues</def:type>
</def:genre>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
<def:genre>
<def:code>boo</def:code>
<def:type>Country</def:type>
</def:genre>
</cd>
</catalog>

Has a default namespace and a specified namespace (def:). In the sylus studio editor, if I key in a select the root displays in the autocomplete selection window, and that's fine, but I can't see anything past root in the auto-complete window.

<xsl:apply-templates select="catalog"/> <-- catalog appears in auto assist

<xsl:apply-templates select="catalog/title"/> <-- must key in manually and does not produce a result

The generated XSLT stylesheet has no namespaces.

Once I modify the XSLT stylesheet adding namespaces, I can get it to work, but still the editor autocomplete function does not work properly.

Here is a working XSLT stylesheet:
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:a="http://www.mycompany.com/abc/xml/"
xmlns:def="http://www.mycompany.com/def/xml/">
>

<xsl:template match="/">
<catalog>
<xsl:for-each select="a:catalog/a:cd">
<cd>
<title><xsl:value-of select="a:title"/></title>
<artist><xsl:value-of select="a:artist"/></artist>
<type><xsl:value-of select="def:genre/def:type"/></type>
</cd>
</xsl:for-each>
</catalog>
</xsl:template>

</xsl:stylesheet>

Since I am new to SS, I am wondering if I'm missing something on how the XSLT editor works. I would assume that multiple namespaces are quite common, so I don't understand why the autocomplete functionality does not work the way I expected it.

Running Stylus Studio Profession Edition 2006 release 3.

Any help appreciated.

Paul

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.