XML convert to DTD Default element type
Oxygen general issues.
-
- Posts: 1
- Joined: Wed Apr 23, 2008 11:06 pm
XML convert to DTD Default element type
When converting the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<XMLDocument>
<Tag1>Data</Tag1>
<Tag2></Tag2>
</XMLDocument>
To a DTD:
<?xml encoding="UTF-8"?>
<!ELEMENT XMLDocument (Tag1,Tag2)>
<!ATTLIST XMLDocument
xmlns CDATA #FIXED ''>
<!ELEMENT Tag1 (#PCDATA)>
<!ATTLIST Tag1
xmlns CDATA #FIXED ''>
<!ELEMENT Tag2 EMPTY>
<!ATTLIST Tag2
xmlns CDATA #FIXED ''>
The Tag2 shows EMPTY.
When converting, is there a way to force all EMPTY tags to (#PCDATA)?
<?xml version="1.0" encoding="UTF-8"?>
<XMLDocument>
<Tag1>Data</Tag1>
<Tag2></Tag2>
</XMLDocument>
To a DTD:
<?xml encoding="UTF-8"?>
<!ELEMENT XMLDocument (Tag1,Tag2)>
<!ATTLIST XMLDocument
xmlns CDATA #FIXED ''>
<!ELEMENT Tag1 (#PCDATA)>
<!ATTLIST Tag1
xmlns CDATA #FIXED ''>
<!ELEMENT Tag2 EMPTY>
<!ATTLIST Tag2
xmlns CDATA #FIXED ''>
The Tag2 shows EMPTY.
When converting, is there a way to force all EMPTY tags to (#PCDATA)?
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XML convert to DTD Default element type
Post by sorin_ristache »
Hello,
The converter looks at the content of the tags when it generates the content model for that XML element. If you want (#PCDATA) content for a tag you have to insert non-empty content in that tag:
Regards,
Sorin
The converter looks at the content of the tags when it generates the content model for that XML element. If you want (#PCDATA) content for a tag you have to insert non-empty content in that tag:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<XMLDocument>
<Tag1>Data</Tag1>
<Tag2>Data2</Tag2>
</XMLDocument>
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service