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)
-> + Duplicate Ouput on Repeating E... (2)
-> + How to canculate grand total. (3)
-> + Displaying two xml files toget... (2)
-> + Replace xml attribs vals with ... (2)
-> + check mark - font problem? (5)
-> - Xml to XML with XSLT (Remove) (10)
-> ->Xml to XML with XSLT (Rem...
-> ->Xml to XML with XSLT (Rem...
-> ->Xml to XML with XSLT (Rem...
-> ->Xml to XML with XSLT (Rem...
-> ->Xml to XML with XSLT (Rem...
-> ->Xml to XML with XSLT (Rem...
-> ->Xml to XML with XSLT (Rem...
-> ->Xml to XML with XSLT (Rem...
-> ->Xml to XML with XSLT (Rem...
-> + Problem viewing xml as html wi... (4)
-> + Need to create lunk through XM... (2)
-> - Pagination with xslt (1)
-> + Transform to text using xslt (5)
-> + Rotating text using XSL FO (2)
-> + XSL -- Trim blanks from a vari... (3)
-> + dynamic matching (4)
-> + XSL:key for each condition - p... (5)
-> + XSL does not sort (5)
-> + CAN i CREATE INTERMEDIATE XML ... (2)
-> + Xml to html conversion (3)
-> + Using Xpath against Variables ... (9)
-> + XML-22004: (Fatal Error) Error... (10)
-> + Current page number (3)
-- Previous [1381-1400] [1401-1420] [1421-1440] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
misha tsvetSubject: Xml to XML with XSLT (Remove)
Author: misha tsvet
Date: 26 Jul 2006 04:02 PM
<device manufacturer="T-Mobile" name="Sidekick&#xAE; 3" src-url="http://www.t-mobile.com/shop/Phones/Detail.aspx?device=7a083f08-7f33-4941-ba63-d6904503dc71" retrieval-time="2006-07-26 08:17:32"/>
Can i remove this symbols: #xAE; from name?

Postnext
Ivan PedruzziSubject: Xml to XML with XSLT (Remove)
Author: Ivan Pedruzzi
Date: 26 Jul 2006 09:29 PM
Hi Misha

Use the XPath function translate to replace a set characters with another characters.
http://www.w3.org/TR/xpath#function-translate

translate(device/@name, '&#xAE;', '')

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
misha tsvetSubject: Xml to XML with XSLT (Remove)
Author: misha tsvet
Date: 27 Jul 2006 11:41 AM
Thanks.

Postnext
misha tsvetSubject: Xml to XML with XSLT (Remove)
Author: misha tsvet
Date: 27 Jul 2006 03:47 PM
can you help me to use this translate(MODELS,'&#xAE;','','&#174;','','®','','©','','&#xA9;','','&#169;','','™','','&#x2122;','','&#8482;','','&#10;',' ','&#9;',' ')
in this XSLT:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="records" match="records/record" use="concat(SRC_URL, DATES, MODELS)"/>
<xsl:template match="/">
<device-list>
<xsl:for-each select="/records/record[generate-id() = generate-id(key('records', concat(SRC_URL, DATES, MODELS))[1])]">
<device manufacturer="{MODELS}" src-url="{SRC_URL}" retrieval-time="{DATES}">
<xsl:variable name="keyVal" select="concat(SRC_URL, DATES, MODELS)"/>
<xsl:for-each select="/records/record[concat(SRC_URL, DATES, MODELS) = $keyVal]">
<property name="{PROPERTY}" value="{VALUE1}"/>
</xsl:for-each>
</device>
</xsl:for-each>
</device-list>
</xsl:template>
</xsl:stylesheet>

Postnext
Ivan PedruzziSubject: Xml to XML with XSLT (Remove)
Author: Ivan Pedruzzi
Date: 27 Jul 2006 04:25 PM

Misha,

Please post the input document and the expected output.


Ivan Pedruzzi
Stylus Studio Team

Postnext
misha tsvetSubject: Xml to XML with XSLT (Remove)
Author: misha tsvet
Date: 27 Jul 2006 04:38 PM
input:
<PHONE_NAME>handspring</PHONE_NAME>
<MODELS>treo650</MODELS>
<PROPERTY>Sprint PCS VisionSM Capabilities</PROPERTY>
<VALUE1>Sprint PCS Video Mail, Sprint PCS Picture Mail, Messaging, Web, and Sprint PCS Business Connection.</VALUE1>
<SRC_URL>http://developer.sprint.com/site/global/develop/devices/java_me/10_cdma/p_handspring_treo650.jsp</SRC_URL>
<DATES>2006-07-27 20:35:58</DATES></record><record>
<PHONE_NAME>handspring</PHONE_NAME>
<MODELS>treo650</MODELS>
<PROPERTY>...</PROPERTY>
<VALUE1>...</VALUE1>
<SRC_URL>http://developer.sprint.com/site/global/develop/devices/java_me/10_cdma/p_handspring_treo650.jsp</SRC_URL>
<DATES>2006-07-27 20:35:58</DATES></record><record>

OUTPUT:

<device-list><device manufacturer="handspring" name="treo650" src-url="http://developer.sprint.com/site/global/develop/devices/java_me/10_cdma/p_handspring_treo650.jsp" retrieval-time="2006-07-27 20:34:16">
<property name="Sprint PCS VisionSM Capabilities" value="Sprint PCS Video Mail, Sprint PCS Picture Mail, Messaging, Web, and Sprint PCS Business Connection."/>
<property name="Familiar Palm OS Productivity Tools" value="The software includes the standard offerings, such as calendar, contacts, memo, and tasks. Additional value-added offerings are built-in, including Real Player, calculator, security, and world clock."/>

Postnext
Ivan PedruzziSubject: Xml to XML with XSLT (Remove)
Author: Ivan Pedruzzi
Date: 27 Jul 2006 08:20 PM

Please read the documentation
http://www.w3.org/TR/xpath#function-translate

Ivan Pedruzzi
Stylus Studio Team

Postnext
misha tsvetSubject: Xml to XML with XSLT (Remove)
Author: misha tsvet
Date: 28 Jul 2006 08:52 AM
I undestend that i can do only 1 translate but can i made multiple translation? becouse i need to remuve 7 strings.

Postnext
Ivan PedruzziSubject: Xml to XML with XSLT (Remove)
Author: Ivan Pedruzzi
Date: 28 Jul 2006 12:35 PM

translate(MODELS, '&#xAE;&#174;®©&#xA9;&#169;™&#x2122;&#8482;&#10;&#9;',' ')

Ivan Pedruzzi
Stylus Studio Team

Posttop
misha tsvetSubject: Xml to XML with XSLT (Remove)
Author: misha tsvet
Date: 28 Jul 2006 01:32 PM
Thanks.

   
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.