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)
-> + Automation using Visual Studio (7)
-> + CSV to XML conversion help (2)
-> + XML tree help (3)
-> + java.lang.NullPointerException... (2)
-> - Creating schema from xml - how... (3)
-> ->Creating schema from xml ...
-> ->Creating schema from xml ...
-> + Mismatch between intellisense ... (4)
-> + Using FOP 0.94 in XML Pipeline (2)
-> - UV Kit (1)
-> - Preview PDF as HTML? (1)
-> + ArrayIndexOutOfBoundsException... (3)
-> + WSCC to KML transform help (5)
-> + Using XSV 3.1-1 as an external... (2)
-> + Cannot debug stylesheet (2)
-> + Error installing Stylus Studio... (3)
-> - Windows XP "not responding" er... (1)
-> - Windows XP "not responding" er... (1)
-> + HTML to XSL (2)
-> + Run Stylus studio from command... (2)
-> + Setting Context for XPath Quer... (5)
-> + Batch process to check well-fo... (9)
-- Previous [1201-1220] [1221-1240] [1241-1260] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Eric RiehlSubject: Creating schema from xml - how do I force all types to string?
Author: Eric Riehl
Date: 13 Mar 2008 01:22 PM
Originally Posted: 13 Mar 2008 01:21 PM
We use xml/xsd for a specialized purpose that requires most if not all elements to by typed as string, regardless of what the actual data looks like.

Is it possible to set Stylus Studio to type all elements as string as a default setting when "Create Schema from XML Content..."?

Thanks.

Postnext
(Deleted User) Subject: Creating schema from xml - how do I force all types to string?
Author: (Deleted User)
Date: 18 Mar 2008 06:39 AM
Hi Eric,
the XMLSchema builder always tries to guess the best type given the sample data; if you need to force a xs:string you can either preprocess the XML data to make its content a generic string (i.e. replace each character with '#') or perform a two-step conversion from XML to DTD and from DTD to XSD.

Hope this helps,
Alberto

Posttop
Eric RiehlSubject: Creating schema from xml - how do I force all types to string?
Author: Eric Riehl
Date: 18 Mar 2008 12:01 PM
Thanks Alberto, the "replace with #" method works great.

   
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.