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
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Carlton NolesSubject: New to Stylus
Author: Carlton Noles
Date: 25 Nov 1999 10:37 AM
I am new with stylus. One of the default rules outputs all of the text. When I add rules I am getting a duplication of the existing text what am I doing wrong?

Postnext
Thomas McclureSubject: New to Stylus
Author: Thomas Mcclure
Date: 25 Nov 1999 10:51 AM
www.potomacgroup.freeservers.com is seeking $US 10,000 venture capital

for development of XML to Java Interpreter in small C to produce JAVA code.

Postnext
Omri TraubSubject: New to Stylus
Author: Omri Traub
Date: 29 Nov 1999 01:11 PM
Hi,

I am not sure that I understand your problem. In general, there are two default rules: one that processes every xml element by searching and applying an appropriate template for each of its children. The other is a default rule for text, which just displays it.

The result of these two is that with a brand new stylesheet, you will see that just the xml text is being displayed.

I am not sure why you are getting duplication. If you post a specific example, I can be more specific.

- Omri.

Postnext
Carlton NolesSubject: New to Stylus
Author: Carlton Noles
Date: 06 Dec 1999 02:19 PM
attached  is the xsl file ---

and here is the html output ---


Carlton Noles Carlton Noles
5508 Rollingwood Dr.5508 Rollingwood Dr.
SarasotaSarasota, FlFl3423234232
nolesce@home.comnolesce@home.com
941.377.6351941.377.6351




Burt Wizeman Burt Wizeman
5322 JoAn Dr.5322 JoAn Dr.
SarasotaSarasota, FlFl3423734237
wizemanb@yahoo.comwizemanb@yahoo.com
941.341.5116941.341.5116






Notice that the data is repeated.

regards,
puzzled


Applicationaddbook.xsl

Postnext
Omri TraubSubject: New to Stylus
Author: Omri Traub
Date: 07 Dec 1999 10:20 AM
Hi,

Here is one of the templates you had:

(xsl:template match="Name")(xsl:apply-templates/)
(font color="Blue")(b) (xsl:value-of select=".")(br/)(/b)(/font)
(/xsl:template)

The reason you get the data repeated is because you have both: (xsl:apply-templates) and (xsl:value-of) in your template. The apply-templates call goes and uses the default text rule to accomplish the same thing as your value-of call. Stylus puts (xsl:apply-templates) in every new template you create. If you want to specify your own content, you may wish to delete that code first.

- Omri.

Posttop
Carlton NolesSubject: New to Stylus
Author: Carlton Noles
Date: 09 Dec 1999 02:23 AM
that was it thank you very much

Carlton

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
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.