ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportIssue With DocType Declaration

Post new topicReply to topic
Issue With DocType Declaration View previous topic :: View next topic
Author Message
Upendra_iib
PostPosted: Thu Apr 13, 2017 7:35 am Post subject: Issue With DocType Declaration Reply with quote

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 &quot;abc.dtd&quot;>

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 &quot;. Please help me to get resolve this issue
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 13, 2017 7:45 am Post subject: Re: Issue With DocType Declaration Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 24452
Location: Ohio, 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
View user's profile Send private message
Upendra_iib
PostPosted: Thu Apr 13, 2017 7:50 am Post subject: Reply with quote

Newbie

Joined: 13 Apr 2017
Posts: 4

Yes * chareter there in my code
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 13, 2017 8:05 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 24452
Location: Ohio, 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
View user's profile Send private message
Upendra_iib
PostPosted: Thu Apr 13, 2017 11:54 pm Post subject: Reply with quote

Newbie

Joined: 13 Apr 2017
Posts: 4

I have done above changes but still same results.

<!DOCTYPE abc SYSTEM &quot;abc.dtd&quot;>
Back to top
View user's profile Send private message
adubya
PostPosted: Fri Apr 14, 2017 2:59 am Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 368
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
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Apr 14, 2017 3:34 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17386

Unless I'm wrong, your SYSTEM is just another XML Property...

So,
Code:
set OutputRoot.XMLNSC.(XMLNSC.DocumentType)SYSTEM='abc'

_________________
Read, Think, Try, Repeat
Back to top
View user's profile Send private message
Upendra_iib
PostPosted: Fri Apr 14, 2017 9:59 pm Post subject: Reply with quote

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 &quot;abc.dtd&quot;>
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Apr 14, 2017 10:27 pm Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19247
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
View user's profile Send private message Send e-mail
adubya
PostPosted: Fri Apr 14, 2017 10:55 pm Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 368
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
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Sat Apr 15, 2017 5:35 pm Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19247
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
View user's profile Send private message Send e-mail
timber
PostPosted: Sun Apr 23, 2017 12:14 pm Post subject: Reply with quote

Yatiri

Joined: 25 Aug 2015
Posts: 654

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
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportIssue With DocType Declaration
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.