Author |
Message
|
Upendra_iib |
Posted: Thu Apr 13, 2017 7:35 am Post subject: Issue With DocType Declaration |
|
|
Newbie
Joined: 13 Apr 2017 Posts: 4
|
HI ALL,
I am facing issue with doctype declaration.Please can you help here.
Code :
SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)* NAME = 'abc SYSTEM "abc.dtd"';
actual Result in output message:
<!DOCTYPE abc SYSTEM "abc.dtd">
Expected out put :
<!DOCTYPE abc SYSTEM "abc.dtd">
while consuming back end application getting below error
The system identifier must begin with either a single or double quote character
Back end application expecting " instead of ". Please help me to get resolve this issue |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 13, 2017 7:45 am Post subject: Re: Issue With DocType Declaration |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Upendra_iib wrote: |
Code :
SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)* NAME = 'abc SYSTEM "abc.dtd"'; |
Is there really a * character in your code?
What version of IIB? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Upendra_iib |
Posted: Thu Apr 13, 2017 7:50 am Post subject: |
|
|
Newbie
Joined: 13 Apr 2017 Posts: 4
|
Yes * chareter there in my code |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 13, 2017 8:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
You could try doing it in 2 steps:
Code: |
DECLARE docType CHARACTER 'abc SYSTEM "abc.dtd"';
SET OutputRoot.XMLNSC.(XMLNSC.DocumentType) NAME = {docType};
|
_________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Upendra_iib |
Posted: Thu Apr 13, 2017 11:54 pm Post subject: |
|
|
Newbie
Joined: 13 Apr 2017 Posts: 4
|
I have done above changes but still same results.
<!DOCTYPE abc SYSTEM "abc.dtd"> |
|
Back to top |
|
 |
adubya |
Posted: Fri Apr 14, 2017 2:59 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
I think your problem is that you're assigning everything to the DOCTYPE.
You need to give the DOCTYPE a name and then provide the SYSTEM value separately.
So
Code: |
SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)* NAME = 'abc';
// And then set the SYSTEM attribute separately.
|
I'm not sure what's the proper way to set the SYSTEM attribute, the IBM documentation gives examples for the XML parser but not for XMLNSC. I'll leave that as an exercise for the reader  _________________ Independent Middleware Consultant
andy@knownentity.com |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Apr 14, 2017 3:34 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Unless I'm wrong, your SYSTEM is just another XML Property...
So,
Code: |
set OutputRoot.XMLNSC.(XMLNSC.DocumentType)SYSTEM='abc' |
_________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Upendra_iib |
Posted: Fri Apr 14, 2017 9:59 pm Post subject: |
|
|
Newbie
Joined: 13 Apr 2017 Posts: 4
|
SYSTEM is not other xml propert. it is part of doctype declaratation only.
The only problem is &quoat; symbol in out put message.
i have tried with different options but still getting &quoat; instead of "(quot)
<!DOCTYPE abc SYSTEM "abc.dtd"> |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 14, 2017 10:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Probably because
Code: |
<!DOCTYPE abc SYSTEM "abc.dtd"> |
id not legal XML.
Should it not be more something like:
Code: |
<!DOCTYPE abc SYSTEM = "abc.dtd"> |
_________________ MQ & Broker admin |
|
Back to top |
|
 |
adubya |
Posted: Fri Apr 14, 2017 10:55 pm Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
OK, as a long shot!
Code: |
SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)* NAME = 'abc';
SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)abc.(XMLNSC.AsisElementContent)SYSTEM = '"abc.dtd"';
|
Will probably end up creating a child element of the doctype rather than an attribute but I don't have IIB to hand to experiment. _________________ Independent Middleware Consultant
andy@knownentity.com |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Apr 15, 2017 5:35 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
adubya wrote: |
OK, as a long shot!
Code: |
SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)* NAME = 'abc';
SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)abc.(XMLNSC.AsisElementContent)SYSTEM = '"abc.dtd"';
|
Will probably end up creating a child element of the doctype rather than an attribute but I don't have IIB to hand to experiment. |
You should rather write that second line like this
Code: |
SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)abc.(XMLNSC.AsisElementContent)SYSTEM = 'abc.dtd'; |
and see what the final result looks like  _________________ MQ & Broker admin |
|
Back to top |
|
 |
timber |
Posted: Sun Apr 23, 2017 12:14 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Looks as if the XMLNSC parser is incorrectly escaping the double-quote character in the value of the SYSTEM attribute. I suggest that you raise a PMR.
( and I don't think any of the workarounds mentioned above will work ). |
|
Back to top |
|
 |
|