Groups | Blog | Home
all groups > dotnet xml > january 2005 >

dotnet xml : DOCTYPE DTD and Entity


branko.geci NO[at]SPAM ht-dot-hr.no-spam.invalid
1/25/2005 5:54:41 PM
I have problem with Entity definition.
____________________________________________
my file "test.xml"
----
<?xml version="1.0" ?>
<!DOCTYPE message [
<!ENTITY % PE "TEST1" >
<!ENTITY Ep "%PE;" >
]>
<message>&Ep;</message>
----
IE6 Error mesage ????
'Parameter entities cannot be used inside markup declarations in an
internal subset.
<!ENTITY Ep "%PE;" >
------------^'
_______________________________________________
But this is OK
------
my file "test_.xml"

<?xml version="1.0" ?>
<!DOCTYPE message [
<!ENTITY % PExt SYSTEM "PExt.dtd" >
%PExt;
]>
<message>&Ep;</message>
------
File "PExt.dtd"

<!ENTITY % PE "TEST1" >
<!ENTITY Ep "%PE;" >
-----
IE6

<?xml version="1.0" ?>
<!DOCTYPE message (View Source for full doctype...)>
<message>TEST1</message>
_______________________________________

*-----------------------*
Posted at:
www.GroupSrv.com
Bjoern Hoehrmann
1/26/2005 2:20:59 AM
* bgeci wrote in microsoft.public.dotnet.xml:
[quoted text, click to view]

Could you clarify what your problem is exactly? How can we help?
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
branko.geci NO[at]SPAM ht-dot-hr.no-spam.invalid
1/26/2005 2:55:00 AM
I can't make PEDecl (parameter entity declaration) with PEReference
(in EntityValue) when I try this in internal DTD, but this
construction is working in external DTD.

Extensible Markup Language (XML) 1.0 (Third Edition)
W3C Recommendation 04 February 2004
Look at:
4.2 Entity Declarations
[72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'

[74] PEDef ::= EntityValue | ExternalID

[9] EntityValue ::= '"' ([^%&"] | PEReference |
Reference)* '"'
| "'" ([^%&'] | PEReference |
Reference)* "'"
[69] PEReference ::= '%' Name ';'
And look at:
4.4 XML Processor Treatment of Entities and References

I can't find any place in W3C Recommendation where is explicit stated
that:
"Parameter entities can only be used to provide part of a declaration
in the external DTD subset. That is, parameter entity references can
only appear inside a declaration in the external DTD subset."

Please write me where was this specified

*-----------------------*
Posted at:
www.GroupSrv.com
Martin Honnen
1/26/2005 1:18:48 PM


[quoted text, click to view]


[quoted text, click to view]

I think this
<http://www.w3.org/TR/2004/REC-xml-20040204/#indtd>
plus
<http://www.w3.org/TR/2004/REC-xml-20040204/#wfc-PEinInternalSubset>
defines where parameter-entity references can occur.


--

Martin Honnen
AddThis Social Bookmark Button