Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
Stylus Studio Technical Forum
»
How to Define DTD in my XML Document?
Topic
Topic Page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Prev Topic
Next Topic
next
Subject:
How to Define DTD in my XML Document?
Author:
Aung Mon
Date:
16 Feb 2005 01:40 AM
How can i define dtd in following xml document phone no and email addr are optional:
<contact>
<name>Aung Mon</name>
<address>
<no>38</no>
<street>Main</street>
<ward>2</ward>
<township>Sanchaung</township>
<state>Yangon</state>
<country>Myanmar</country>
</address>
<phone>
<option_1>0723472130</option_1>
<option_2>95-1-518854</option_2>
<option_3>95-1-560874</option_3>
</phone>
<email>
<option_1>amon@mail2rock.com</option_1>
<option_2>amchtwe@gmail.com</option_2>
<option_3>aung@altechlanka.com</option_3>
</email>
</contact>
top
Subject:
How to Define DTD in my XML Document?
Author:
Ivan Pedruzzi
Date:
16 Feb 2005 06:33 PM
- Open the document in Stylus Studio
- click XML -> "create Schema from XML content"
- choose "Internal DTD"
By default Stylus Studio creates the contact children mandatory so
change this
<!ELEMENT contact (name,address,email,phone)>
to this
<!ELEMENT contact (name,address,email?,phone?)>
Hope this helps
Ivan
Topic Page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Prev Topic
Next Topic
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 to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
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.