PEReference error with XML external ENTITY DTD
up vote
0
down vote
favorite
I have this XML code declaring an external DTD ENTITY:
<!DOCTYPE customers [
<!ENTITY % itemCodes SYSTEM "codes.dtd">
%itemCodes;
]>
This is simply to call up some pre-written codes from codes.dtd:
<!ENTITY DCT5Z "Tapan Digital Camera 5 Mpx - zoom">
<!ENTITY SM128 "SmartMedia 128MB Card">
<!-- etc. -->
But I get this error:
This page contains the following errors:
error on line 53 at column 8: PEReference: %itemCodes; not found
Why would that be?
xml import entity external doctype
add a comment |
up vote
0
down vote
favorite
I have this XML code declaring an external DTD ENTITY:
<!DOCTYPE customers [
<!ENTITY % itemCodes SYSTEM "codes.dtd">
%itemCodes;
]>
This is simply to call up some pre-written codes from codes.dtd:
<!ENTITY DCT5Z "Tapan Digital Camera 5 Mpx - zoom">
<!ENTITY SM128 "SmartMedia 128MB Card">
<!-- etc. -->
But I get this error:
This page contains the following errors:
error on line 53 at column 8: PEReference: %itemCodes; not found
Why would that be?
xml import entity external doctype
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have this XML code declaring an external DTD ENTITY:
<!DOCTYPE customers [
<!ENTITY % itemCodes SYSTEM "codes.dtd">
%itemCodes;
]>
This is simply to call up some pre-written codes from codes.dtd:
<!ENTITY DCT5Z "Tapan Digital Camera 5 Mpx - zoom">
<!ENTITY SM128 "SmartMedia 128MB Card">
<!-- etc. -->
But I get this error:
This page contains the following errors:
error on line 53 at column 8: PEReference: %itemCodes; not found
Why would that be?
xml import entity external doctype
I have this XML code declaring an external DTD ENTITY:
<!DOCTYPE customers [
<!ENTITY % itemCodes SYSTEM "codes.dtd">
%itemCodes;
]>
This is simply to call up some pre-written codes from codes.dtd:
<!ENTITY DCT5Z "Tapan Digital Camera 5 Mpx - zoom">
<!ENTITY SM128 "SmartMedia 128MB Card">
<!-- etc. -->
But I get this error:
This page contains the following errors:
error on line 53 at column 8: PEReference: %itemCodes; not found
Why would that be?
xml import entity external doctype
xml import entity external doctype
edited Nov 18 at 14:22
Cœur
17k9102140
17k9102140
asked Jan 12 '13 at 21:59
Pori
3262416
3262416
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Why would that be?
Because it can't find the codes.dtd
file. If you aren't using some sort of catalog based resolution mechanism, then the codes.dtd
would have to be in the working directory of the program you're running.
But an error on line 53 seems odd. That's too far into a file for a DTD. What does line 53 look like?
UPDATE: On reconsideration, the problem may not be that codes.dtd
couldn't be found, but that the XML parser being used doesn't process external entities. (After all, it said that the PE reference itself, and not its referent, couldn't be found.) This is a quite common limitation of non-validating parsers, but the error diagnostic could have been more helpful ("Sorry, external entity references are not supported".)
If what you're say is true, then why would the DTD file not be found within the same directory as the XML file? I have everything placed together and am simply trying to open the file in Chrome. Also, The reason line 53 shows up is because the DOCTYPE has some internal declarations that I excluded.
– Pori
Jan 13 '13 at 2:00
In that case, I may have misunderstood the error message. I'll add an update.
– arayq2
Jan 13 '13 at 2:07
Isn't Chrome's XML support quite limited? If you put the entire internal subset in another dtd file and just have<!DOCTYPE customers SYSTEM "external.dtd">
, you may find out whether external entities are supported.
– arayq2
Jan 13 '13 at 2:14
It seems to work fine on Firefox. However, Firefox can't seem to import the codes I saved in the DTD.
– Pori
Jan 14 '13 at 1:32
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Why would that be?
Because it can't find the codes.dtd
file. If you aren't using some sort of catalog based resolution mechanism, then the codes.dtd
would have to be in the working directory of the program you're running.
But an error on line 53 seems odd. That's too far into a file for a DTD. What does line 53 look like?
UPDATE: On reconsideration, the problem may not be that codes.dtd
couldn't be found, but that the XML parser being used doesn't process external entities. (After all, it said that the PE reference itself, and not its referent, couldn't be found.) This is a quite common limitation of non-validating parsers, but the error diagnostic could have been more helpful ("Sorry, external entity references are not supported".)
If what you're say is true, then why would the DTD file not be found within the same directory as the XML file? I have everything placed together and am simply trying to open the file in Chrome. Also, The reason line 53 shows up is because the DOCTYPE has some internal declarations that I excluded.
– Pori
Jan 13 '13 at 2:00
In that case, I may have misunderstood the error message. I'll add an update.
– arayq2
Jan 13 '13 at 2:07
Isn't Chrome's XML support quite limited? If you put the entire internal subset in another dtd file and just have<!DOCTYPE customers SYSTEM "external.dtd">
, you may find out whether external entities are supported.
– arayq2
Jan 13 '13 at 2:14
It seems to work fine on Firefox. However, Firefox can't seem to import the codes I saved in the DTD.
– Pori
Jan 14 '13 at 1:32
add a comment |
up vote
0
down vote
Why would that be?
Because it can't find the codes.dtd
file. If you aren't using some sort of catalog based resolution mechanism, then the codes.dtd
would have to be in the working directory of the program you're running.
But an error on line 53 seems odd. That's too far into a file for a DTD. What does line 53 look like?
UPDATE: On reconsideration, the problem may not be that codes.dtd
couldn't be found, but that the XML parser being used doesn't process external entities. (After all, it said that the PE reference itself, and not its referent, couldn't be found.) This is a quite common limitation of non-validating parsers, but the error diagnostic could have been more helpful ("Sorry, external entity references are not supported".)
If what you're say is true, then why would the DTD file not be found within the same directory as the XML file? I have everything placed together and am simply trying to open the file in Chrome. Also, The reason line 53 shows up is because the DOCTYPE has some internal declarations that I excluded.
– Pori
Jan 13 '13 at 2:00
In that case, I may have misunderstood the error message. I'll add an update.
– arayq2
Jan 13 '13 at 2:07
Isn't Chrome's XML support quite limited? If you put the entire internal subset in another dtd file and just have<!DOCTYPE customers SYSTEM "external.dtd">
, you may find out whether external entities are supported.
– arayq2
Jan 13 '13 at 2:14
It seems to work fine on Firefox. However, Firefox can't seem to import the codes I saved in the DTD.
– Pori
Jan 14 '13 at 1:32
add a comment |
up vote
0
down vote
up vote
0
down vote
Why would that be?
Because it can't find the codes.dtd
file. If you aren't using some sort of catalog based resolution mechanism, then the codes.dtd
would have to be in the working directory of the program you're running.
But an error on line 53 seems odd. That's too far into a file for a DTD. What does line 53 look like?
UPDATE: On reconsideration, the problem may not be that codes.dtd
couldn't be found, but that the XML parser being used doesn't process external entities. (After all, it said that the PE reference itself, and not its referent, couldn't be found.) This is a quite common limitation of non-validating parsers, but the error diagnostic could have been more helpful ("Sorry, external entity references are not supported".)
Why would that be?
Because it can't find the codes.dtd
file. If you aren't using some sort of catalog based resolution mechanism, then the codes.dtd
would have to be in the working directory of the program you're running.
But an error on line 53 seems odd. That's too far into a file for a DTD. What does line 53 look like?
UPDATE: On reconsideration, the problem may not be that codes.dtd
couldn't be found, but that the XML parser being used doesn't process external entities. (After all, it said that the PE reference itself, and not its referent, couldn't be found.) This is a quite common limitation of non-validating parsers, but the error diagnostic could have been more helpful ("Sorry, external entity references are not supported".)
edited Jan 13 '13 at 2:13
answered Jan 13 '13 at 1:33
arayq2
1,903816
1,903816
If what you're say is true, then why would the DTD file not be found within the same directory as the XML file? I have everything placed together and am simply trying to open the file in Chrome. Also, The reason line 53 shows up is because the DOCTYPE has some internal declarations that I excluded.
– Pori
Jan 13 '13 at 2:00
In that case, I may have misunderstood the error message. I'll add an update.
– arayq2
Jan 13 '13 at 2:07
Isn't Chrome's XML support quite limited? If you put the entire internal subset in another dtd file and just have<!DOCTYPE customers SYSTEM "external.dtd">
, you may find out whether external entities are supported.
– arayq2
Jan 13 '13 at 2:14
It seems to work fine on Firefox. However, Firefox can't seem to import the codes I saved in the DTD.
– Pori
Jan 14 '13 at 1:32
add a comment |
If what you're say is true, then why would the DTD file not be found within the same directory as the XML file? I have everything placed together and am simply trying to open the file in Chrome. Also, The reason line 53 shows up is because the DOCTYPE has some internal declarations that I excluded.
– Pori
Jan 13 '13 at 2:00
In that case, I may have misunderstood the error message. I'll add an update.
– arayq2
Jan 13 '13 at 2:07
Isn't Chrome's XML support quite limited? If you put the entire internal subset in another dtd file and just have<!DOCTYPE customers SYSTEM "external.dtd">
, you may find out whether external entities are supported.
– arayq2
Jan 13 '13 at 2:14
It seems to work fine on Firefox. However, Firefox can't seem to import the codes I saved in the DTD.
– Pori
Jan 14 '13 at 1:32
If what you're say is true, then why would the DTD file not be found within the same directory as the XML file? I have everything placed together and am simply trying to open the file in Chrome. Also, The reason line 53 shows up is because the DOCTYPE has some internal declarations that I excluded.
– Pori
Jan 13 '13 at 2:00
If what you're say is true, then why would the DTD file not be found within the same directory as the XML file? I have everything placed together and am simply trying to open the file in Chrome. Also, The reason line 53 shows up is because the DOCTYPE has some internal declarations that I excluded.
– Pori
Jan 13 '13 at 2:00
In that case, I may have misunderstood the error message. I'll add an update.
– arayq2
Jan 13 '13 at 2:07
In that case, I may have misunderstood the error message. I'll add an update.
– arayq2
Jan 13 '13 at 2:07
Isn't Chrome's XML support quite limited? If you put the entire internal subset in another dtd file and just have
<!DOCTYPE customers SYSTEM "external.dtd">
, you may find out whether external entities are supported.– arayq2
Jan 13 '13 at 2:14
Isn't Chrome's XML support quite limited? If you put the entire internal subset in another dtd file and just have
<!DOCTYPE customers SYSTEM "external.dtd">
, you may find out whether external entities are supported.– arayq2
Jan 13 '13 at 2:14
It seems to work fine on Firefox. However, Firefox can't seem to import the codes I saved in the DTD.
– Pori
Jan 14 '13 at 1:32
It seems to work fine on Firefox. However, Firefox can't seem to import the codes I saved in the DTD.
– Pori
Jan 14 '13 at 1:32
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f14298366%2fpereference-error-with-xml-external-entity-dtd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown