Hello,
Who can help on this issue? Thanks.
Regards,
Caron
From: Liu, Jing (LJ, HPSW-BTO-R&D-SH)
Sent: Monday, February 08, 2010 8:19 PM
To: [email protected]
Cc: Zhao, Kun (Caron,HPSW-BTO-R&D-SH)
Subject: Question about XML namespace prefix in Atom XML representation
generated by Wink 1.0
Hi guys,
My question is about the xml format.
Suppose I am using SyndEntry to build an Atom entry
SyndEntry entry = new SyndEntry( getTitle(), getId(), getUpdated());
entry.setSummary(new SyndText( getSummary()));
entry.setContent(new SyndContent( new DOMSource(om), MediaType.TEXT_XML, false)
);
See the word highlight in red, I am setting an XML content to the ATOM entry.
I got following XML representation from Wink in my client:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:ns2="http://a9.com/-/spec/opensearch/1.1/"
xmlns:ns3="http://www.w3.org/1999/xhtml">
<id>urn:x-hp:software:servicemanager:incident:id:66B778C1-7337-4307-8754-3DC4DB66C82D</id>
<updated>2010-02-01T16:46:36.000+08:00</updated>
<title type="text">IM10006</title>
<summary type="text">Everyday around lunch time my PC starts
rebooting for no apparent reason. Can you please check what's wrong? I get an
error message about CPU temperature.</summary>
<link
href="http://smci022.asiapacific.hpqcorp.net:23080/SM/7/rest/1.1/incident_list/reference_number/IM10006?alt=application%2Fjson"
type="application/json" rel="alternate"/>
<content type="text/xml">
<ns6:incident
xmlns:incident="http://www.hp.com/2009/software/data_model" xmlns=""
xmlns:ns6="http://www.hp.com/2009/software/data_model"
relationships_included="false"
self="http://smci022.asiapacific.hpqcorp.net:23080/SM/7/rest/1.1/incident_list/reference_number/IM10006"
type="urn:x-hp:2009:software:data_model:type:incident" version="1.1">
<ns6:global_id>urn:x-hp:software:servicemanager:incident:id:66B778C1-7337-4307-8754-3DC4DB66C82D</ns6:global_id>
<ns6:name>Pop-up appears while
working with Office, Office needs installation of additional
components</ns6:name>
<ns6:description>Everyday
around lunch time my PC starts rebooting for no apparent reason. Can you please
check what's wrong? I get an error message about CPU
temperature.</ns6:description>
<ns6:last_modified_time>2010-02-01T08:46:36+00:00</ns6:last_modified_time>
<ns6:active_process>true</ns6:active_process>
...
...
We saw the "ns6:" prefix in the eventual xml content. That's Wink automatically
generated for us, we know this is valid and good for prevent namespace mess.
But is there any way we can change this automated prefix or maybe remove it, or
take control how to format an ATOM entry's xml representation?
Since "ns6" sometimes looks a little bit ugly, if we may customized it with a
more human readable, meaningful prefix, that will be better.
Best Regards,
Liu Jing (LJ,HPSW-BTO-R&D-SH)
[cid:[email protected]]
Shanghai Engineering Lab
BTO Operations SPM R&D
Hewlett-Packard Company
Tel: 021-38896806