is possible [REWRITE, ADD, EXTEND] a element of DTD?
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 1
- Joined: Mon Oct 28, 2019 8:33 pm
is possible [REWRITE, ADD, EXTEND] a element of DTD?
hello,
I need use/create XHTML documents.
by years I use this four lines:now I need add my own group of TAGS:
mytagone,
mytagtwo,
...
I try with:but https://validator.w3.org/ ever reply:
becouse ELEMENT body defined in the DTD http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd no´t include the ELEMENT (tag) "<mytagone>".
How I can:
Thanks by your help!
I need use/create XHTML documents.
by years I use this four lines:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es">
<head>.
.
.
</head><body>...
mytagone,
mytagtwo,
...
I try with:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
[
<!ELEMENT mytagone (#PCDATA>
<!ELEMENT mytatwo (#PCDATA>
<!ELEMENT mytagtree (#PCDATA>
]>
why?document type does not allow element "mytag" here
becouse ELEMENT body defined in the DTD http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd no´t include the ELEMENT (tag) "<mytagone>".
How I can:
- Load the external DTD http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd
- ADD my own DTD with my own group of TAGS
Thanks by your help!
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: is possible [REWRITE, ADD, EXTEND] a element of DTD?
Hi,
What's the use case? What are you trying to accomplish with those custom elements/tags?
The problem is this won't validate as XHTML 1.1, simply because XHTML 1.1 doesn't allow custom elements.
You can probably make it validate by itself as XML since the XHTML 1.1 DTDs are extendable. Have a look here:
https://www.w3.org/TR/xhtml-modularizat ... oping.html
Regards,
Adrian
What's the use case? What are you trying to accomplish with those custom elements/tags?
The problem is this won't validate as XHTML 1.1, simply because XHTML 1.1 doesn't allow custom elements.
You can probably make it validate by itself as XML since the XHTML 1.1 DTDs are extendable. Have a look here:
https://www.w3.org/TR/xhtml-modularizat ... oping.html
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Return to “General XML Questions”
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