URL and Web Services for IPC Internet Publication

balecomputerΑσφάλεια

3 Νοε 2013 (πριν από 3 χρόνια και 9 μήνες)

133 εμφανίσεις






WORLD INTELLECTUAL PROPERTY ORGANIZATION



SPECIAL UNION FOR THE INTERNATIONAL PATENT
CLASSIFICATION

(IPC UNION)


URL and Web Services for IPC Internet
Publication


Content
s

ii



Date

By

Version

Status

Modification

August 5, 2010

Collioud

2.10


Draft

Creation

February 9, 2006

Moles

0.2

Draft

menulang parameter added

April 5, 2006

Fiévet

1.0

Final

Review

October 30, 2008

C
ollioud

2.0

Draft

URL addition to access other services

November 27, 2008

Collioud

2.
1

Draft

Each service has its own URL

Addition of the “bridge” service

April 20
, 2009

Collioud

2.2

Draft

Change in catchword URL (cwid
, initial
)

May 5, 2009

Fievet/Conde

2.3

Revised

Remove level option

March 5, 2010

Collioud

2.4

Draft

New internet publication compliance

March 5, 2010

Fievet

2.5

Approved

Terminology + “fixed” parts of URLs

April 19, 2010

Conde

2.
6

Draft

Return

symbol information to webapps

June 9, 201
0

Fievet

2.7

PF Revised

Terminology +

defa
ult values and
mandatory parame
ters.

June 9, 2010

Conde

2.8

Draft

Remove of Webservices and its examples

August 5, 2010

Collioud

2.9

PF Revised

Webservices

September 14, 2010

Collioud

2.10

PF Revised

XML2HTML We
b Service added

February 3, 2011

Conde

2.1
1

PF Revised

Addition of
Version=
l
a
t
est

October 30, 2012

Collioud

2.12

Revised

Validity service to return version number

November
12
, 2012

Collioud

2.13

Revised

Cookie to be allowed for wipo.int
.

March 19, 2013

Collioud

3.0

Revised

IPCPUB 3.0 allowing case insensitive
symbols in URLs

June 7
, 2013

Collioud

3.1

PF
Revised

Added

Concordance to


service

Contact: WIPO: Patrick FIÉVET



(patrick.fievet@wipo.int)

Table of Contents

1.

Introduction

................................
................................
................................
........................

3

2.

Access to specific functionality of part of the user interface

................................
.............

4

2.1.

Scheme

................................
................................
................................
.......................

4

2.2.

RCL

................................
................................
................................
............................

5

2.3.

Catchwords

................................
................................
................................
.................

5

2.4.

Compilation

................................
................................
................................
................

6

2.5.

Definitions

................................
................................
................................
..................

6

2.6.

Terms

................................
................................
................................
..........................

7

2.7.

Illustrations

................................
................................
................................
.................

7

2.8.

Links to other databases

................................
................................
.............................

8

2.9.

Functionality “Store specific information about current client session status on
application server”

................................
................................
................................
..................

8

3.

Web services

................................
................................
................................
......................

9

3.1.

“Get” service

................................
................................
................................
..............

9

3.1.1.

Get selected IPC Symbol

................................
................................
....................

9

3.2.

“Check IPC Symbol Validity” service

................................
................................
.....

10

3.3.

“XML2HTML” service

................................
................................
............................

11

3.
1.

“Concordance To” service

................................
................................
.......................

12

4.

Examples

................................
................................
................................
..........................

13

4.1.

Access to the scheme

................................
................................
................................

13

4.2.

Select IPC symbol through IPC internet publication

................................
...............

13

4.3.

IPC symbol validity checking through call to the IPC internet publication service

14

4.3.1.

Example using JQuery

................................
................................
.....................

14

4.3.2.

Example using Python

................................
................................
......................

14

4.4.

Converting IPC A01N XML defin
ition file to HTML through a call to IPC internet
publication service

................................
................................
................................
................

15

4.4.1.

Example using Python

................................
................................
......................

15

4.5.

Get the list of IPC

concordance for IPC revision 2013.01 through call to the IPC
internet publication service

................................
................................
................................
..

16

4.5.1.

Example using JQuery

................................
................................
.....................

16

4.5
.2.

Example using Python

................................
................................
......................

17


Content
s

ii



URL and Web Services for IPC Internet Publication


3
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13

1.

Introduction

The
purpose of this
file is to
docum
ent how various functionality of IPCPUBPREP
-

the IPC Internet publication proposed by WIPO
-

can be accessed through URL e.g. to
hyperlink IPC sym
bols in a patent document to the corresponding place in the IPC
internet publication in authentic languages (hosted by WIPO) or to the corresponding
place in the internet publication of national translation of the IPC for IP offices using
IPCPUBPREP.

The
U
RL of the IPC Internet publication is made of a fixed
character string

e.g.
http://www.wipo.int/ipcpub/

and can optionally be
concatenat
ed
with
a number

of
parameters that can be used

t
o indicate

specific
aspe
ct
s of what should be displayed
.

The parameters are set through a list of statements in the form of
parameter_name=value

and separated by
&
.

Part of the t
erminology used in this document is explained
in the on
-
line help of the
system

.

In the following, man
datory parameters i.e. without which nothing would be
displayed are indicated by (*)

and
parameter default values are indicated by (+).

Note

that
parameter_name

and
value

are case sensitive

excepted for symbol value
.

URL and Web Services for IPC Internet Publication


4
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13

2.

A
ccess to specific functionality of pa
rt of the user
interface

2.1.

Scheme

The fixed part of the URL is

http://www.wipo.int/ipcpub/?

to be concatenated with
the following parameters and values:

Parameter

Description

Values

Meaning

NONE

The scheme at Se
ction level for the
current edition of the IPC with all
default values



notion

IPC Scheme

scheme

scheme

version

version of the IPC

in YYYYMMDD
format e.g., 20060101

(+)

Current version i.e.
version in force

la
t
est

Latest
published
version
of the IPC

symbol

14 character string with zero padding (same convention described in the XML
validity file) e.g. [A01N0065000000]

viewmode

Different ways to
view

of the IPC.

f (+)

Fulltext

a

Path

h

Hierarchic view



priorityorder

presentation of the
stan
dardized sequence
order

yes | no (+)


notes

presentation of the
notes

yes (+) | no


headings

presentation of the
guidance headings

yes (+) | no


indexes

Allows the presentation of the subsection,
class and subclass
indexes
.

yes | no (+)


showdeleted

If

yes
, deleted entries are presented (for
the 8th edition, valid only on the advanced
level).


y
es(+) | no


menulang

The
language

of the interface (
menu
,
buttons, ….

FR

French

EN (+)

English

lang

Language(s)

in which the IPC is
displayed.

en (+)

Englis
h

fr

French

enfr

double

language

EN/FR

presentation







URL and Web Services for IPC Internet Publication


5
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13

2.2.

RCL

The fixed part of the URL is
http://www.wipo.int/ipcpub/
?

to be concatenated with
the following parameters and values:

Parameter

Description

V
alues

Meaning

notion (*)

Reverse Concordance List

rcl

RCL

symbol

14 character string with zero padding, e.g. [A01N0065000000]

If not specified the RCL summary page is accessed

direction

Whether the concordance is shown from the old
version
to the new o
r the
opposite
.

o2n

(+)

Old
-
to
-
new

n2o

New
-
to
-
old

version

Target version of the IPC

in YYYYMMDD format
e.g., 20100101 to get the RCL from IPC 2009.01 to
IPC 2010.01

(+)


Current version i.e.
version in force

latest

Latest published
version of the IP
C

menulang

The
language

of the interface (
menu
, buttons, …)

EN (+)

English

FR

French


2.3.

Catchwords

The fixed part of the URL is
http://www.wipo.int/ipcpub/
?

to be concatenated with
the following parameters an
d values:

Parameter

Description

Values

Meaning

notion (*)

Catchword Index

cw

Catchword
Index

initial

A capital letter, the initial of the catchword entry which is also the name of the HTML
page containing all the catchword entries starting with this let
ter.

cwid

An integer
, as defined in the catchword master file as the unique identifier for any
catchword entry.

I
f not specified the Catchword index summary page is accessed

initial

A

capital

letter, the initial of the catchword entry which is also the n
ame of the HTML
page containing all the catchword entries starting with this letter.

version

version of the IPC

in YYYYMMDD format e.g.,
20060101

(+)

Current version

latest

Latest
published
version of the
IPC

lang

Language(s)

in which the IPC is displ
ayed.

en (+)

English

fr

French

enfr

Both English
and French

menulang

The
language

of the interface (
menu
, buttons…

EN (+)

English

FR

French






URL and Web Services for IPC Internet Publication


6
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13

2.4.

Compilation

The fixed part of the URL is
http://www.wip
o.int/ipcpub/
?

to be concatenated with
the following parameters and values:

Parameter

Description

Values

Meaning

notion (*)

Compilation of changes in the full IPC

compilation

Full IPC
compilation

version

version of the IPC

in YYYYMMDD format e.g.,
200
60101

(+)

Current version

latest

Latest published
version of the IPC

lang

Language(s)

in which the IPC is displayed.

e
n

(+)

English

fr

French

menulang

The
language

of the interface (
menu
,
buttons…
)

EN

(+)

English

FR

French


2.5.

Definitions

The fixe
d part of the URL is
http://www.wipo.int/ipcpub/definition/?

to be
concatenated with the following parameters

and values
:

Parameter

Description

Values

Meaning

symbol

(*)

14 cha
racter string with zer
o padding,

e.g. [A01N0065000000]

If not specified the global definitions document is accessed
.

version
(*)

version of the IPC

in YYYYMMDD format e.g.,
20060101

(+)

Current
version

latest

Latest
published
version of
the IPC

lang
(*)

Language(s)

in whic
h the IPC is displayed.

en (+)

English

fr

French

menulang

The
language

of the web interface (
menu
, buttons…)

EN (+)

English

FR

French


URL and Web Services for IPC Internet Publication


7
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13


2.6.

Terms

The fixed part of the URL is
http://www.wipo.int/ipc
pub/glossary/
?

to be
concatenated with the following parameters:

Parameter

Description

Values

Meaning

version
(*)

version of the IPC

in YYYYMMDD format e.g.,
20060101

(+)

Current
version

latest

Latest
published
version of
the IPC

lang
(*)

Language(s)

i
n which the IPC is displayed.

en (+)

English

fr

French

symbol(*)

14 character string with zero padding, e.g. [A01N0065000000]

If not specified the global definitions document is accessed.

term(*)

A string made of uppercased letters and 0 or more under
score or minus (_ or
-
)
character.

Access the definition of the specified term. If not specified, the whole definitions
document related to the specified symbol is accessed.

menulang

The
language

of the web interface (
menu
, buttons…)

EN (+)

English

FR

French

2.7.

Illustrations

The fixed part of the URL is
http://www.wipo.int/ipcpub/illustration/
?

to be
concatenated with the following parameters:

Parameter

Description

Values

Meaning

s
ymbol
(*)

14 cha
racter string with zero padding, e.g. [A01N0065000000]

version
(*)

version of the IPC

in YYYYMMDD format e.g.,
20060101

(+)

Current version

latest

Latest published
version of the
IPC

count
(*)

Number of i
llustration
(s) to be displayed

(there
can be mo
re than one).

>=1



menulang

The
language

of the web interface (
menu
,
buttons…

EN

(+)

English

FR

French


URL and Web Services for IPC Internet Publication


8
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13


2.8.

Links to other databases

The fixed part of the URL is
http://www.wipo.int/ipcpub/bridge/
?

t
o be concatenated
with the following parameters:

Parameter

Description

Values

Meaning

symbol
(*)

14 character string with zero padding, e.g. [A01N0065000000]

version(*)

version of the IPC

in YYYYMMDD format e.g.,
20060101

(+)

Current version

latest

La
test published
version of the IPC

menulang

The
language

of the web interface (
menu
,
buttons…

EN (+)

English

FR

French


2.9.

Functionality “
Store

specific information about
current client

session

status on application server


Caution
: web browser must accep
t Cookies from
wipo.int

in order to use this service.

This
option

stores the

information

specified as value of the parameter

in a file
associated to the current client session
. This is
used

for

example to retrieve
later

an IPC
symbol previously selected by the user (
using

the Get

IPC

Symbol web service described
under the
next section) from other IPC related
web
applications
.


The fixed part of the URL is
http://www.wipo.int/ipcpub/
?

to be concatenated with
the following parameters:

Parameter

Description

Values

Meaning

store

The IPC notion to be stored.

A
ctivate
s

the
automatic storage

of
the
“Current symbol”
.

symbol

The symbol in the
“Current
Symbol” box


URL and Web Services for IPC Internet Publication


9
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13


3.

Web services

Caution
: parameters must be
in the same order

as in each table
below.

3.1.


Get


service

This section describes services used to retrieve information stored as described under
“Store specific information about current client session

status on application server


3.1.1.

Get

selected

IPC S
ymbol

Caution
: web browser must accept Cookies from
wipo.int

in order to use this service.

This service is
to

retrieve

the symbol stored in
application

server

as describe
d in
2.9
.

The fixed part of the URL is
http://www.wipo.int/ipcpub/?

to be concatenated with
the following parameters:

Parameter

Desc
ription

Values

Meaning

get
(*)

The IPC notion
previously

stored.

Returns the symbol stored in the current
web application server session as a JSON
object.

If
no symbol was
previously stored, the
returned value is “none”.

If cookies from wipo.int are not ac
cepted,
the returned value is “nocookie”

symbol

Information

stored
as
described
under

2.9
.

when
s
tore=symbol

jsonpcallback
(*)

If set to a value other than “none”, t
his
parameter allow for cross
-
domain call of
t
he service from JavaScript enabled web
browsers.

In such case, the
service returns a JSON
object such as:

jsonp
key
("A01N0001000000")


If
jsonpcallback

is set to “none”, this
獥牶楣e⁲e瑵牮猠t⁊p低扪散琠獵捨⁡s


"A01N0001000000"


Key

or
none

K
ey

is
a

valu
e
which allow client
and server sides
of the application
to
identify each
other
.

It is
recommended
to

leave the
generation of
K
ey

to the client

application

(see
example below)


URL and Web Services for IPC Internet Publication


10
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13


3.2.


Check IPC
Symbol V
alidity


service

This service is

for checking
the
validi
ty of
an IPC symbol
.

The fixed part of the URL is
http://www.wipo.int/ipcpub/?

to be concatenated with
the following parameters:

Parameter

Description

Values

Meaning

get (*)

Parameter called by an IPC
related
application.

validity

Call IPC

validity service

symbol (*)

14 character string wit
h zero padding, e.g.
[A01N006503
0000]

Symbol to check for validity

version (*)

version of the IPC

in
YYYYMMDD format e.g.,
200
9
0101

version of
the IPC

in
YYYYMM
DD format

V
ersion for which the
symbol must be valid

latest

Latest published version of
the IPC

jsonpcallback(*)

If set to a value other than
“none”, this parameter allow
for cross
-
domain call of the
service from JavaScript
enabled web browsers and
returns a JSON

object instead
of an XML fragment


Key

or none

Key

is a value which allow
client and server sides of the
application to identify each
other.

It is more safe to leave the
generation of
Key

to the
client application (see
example below)


If
jsonpcallback

is

set to “none”
, t
his

service returns an XML fragment such as:

<ipc
-
validity
-
check>


<cla
ssification
-
ipcr>


<version>20130101</version>


<section>A</section>


<class>01</class>


<subclass>N
</subcl
ass>


<main
-
group>0065
</main
-
group>


<sub
group>03
0000</subgroup>


<ipc
-
version
-
indicator>2009
0101</ipc
-
version
-
indicator>


<symbol
-
category>I</symbol
-
category>


<classification
-
validity>V</classification
-
validity>


</classification
-
ipcr>

</ipc
-
validity
-
check>


With:

version
:
versi
on of the IPC

in YYYYMMDD format
.

section, class, subclass, main
-
group, subgroup
: describe the concerned IPC symbol. These
elements are defined in the IPC validity file

specification
.

URL and Web Services for IPC Internet Publication


11
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13

ipc
-
version
-
indicator
:
IPC
version

in which the

symbol was last revised

(
YYYYMMDD
format
)
.

As all symbols were considered revised at the opportunity of the IPC reform in
January 2006, the following convention is used: if the symbol is marked in the IPC
scheme as last revised in a version before 2006.01 the returned ipc
-
version
-
indicator
is 2006.01.

This element is not returned if
symbol is not valid
.

symbol
-
category
:

K

,

I


or

D


(see

entry
-
type in

IPC
validity file specification).
This element is not returned if
symbol is not valid.

classification
-
validity
:

V


or

N


(
V
ali
d /
N
ot valid)
. The value in this element is
the binary result of checking existence of symbol defined by
section, class, subclass,
main
-
group, subgroup

in the IPC version referred to by
version
.


If
jsonpcallback

is
different to “none”
, this serv
ice retur
ns a

JSON object

such as:

key
(
{


"
version
": "
20130101
",


"section": "
A
",


"class": "01",


"subclass": "N
",


"
ma
in_group": "0065
",


"
s
ubgroup": "03
0000",


"ipc_version_
indicator
": "
2009
010
1",


"symbol_
category
": "
K
",


"
classificat
ion_
validity
": "
V
"

}
)


3.3.

“XML2HTML”

service

This service is

for

viewing an

IPC compliant XML fragment
through layout rules and
style sheets used in the IPC internet publication. This is done through transformation
of the received XML fragment into

HTML

fra
gment returned to the calling
application
.

The fixed part of the URL is
http://www.wipo.int/ipcpub/?

to be concatenated with
the following parameters:

Parameter

Description

Values

Meaning

xml2html
(*)

Parameter

called by an IPC
related application.

D
efinition

(#)

Ask for
xml2html

service

and define the type of XML
data sent to the service in
the HTTP request body

lang
(*)

Language(s)

in which the IPC
is displayed.

en

English

fr

French

symbol (*)

14 character

string with zero padding, e.g.
[A01N0065000000]

IPC
Symbol

(
#

)
may be extended with other types of
XML
fragment (e.g. scheme)

in future

URL and Web Services for IPC Internet Publication


12
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13

3.1.

“Concordance To”

service

The purpose of this service is to provide, for a given revision of the IPC (indicated by
it
s “version”), the number and list of IPC symbols (“concordance
-
to
-
symbol”) that
should be considered for the symbol (concordance
-
from
-
symbol) indicated as
parameter during the call.


The fixed part of the URL is
http://www.wipo.int/ipcpub/?

to be concatenated with
the following parameters:

Parameter

Description

Values

Meaning

get (*)

Parameter called by an IPC
related application.

concorda
nce
-
t
o

Get a number and list of
symbols

(between the previous
version an
d the one
indicated by “version”

symbol (*)

14 character string wit
h zero padding, e.g.
[A01N006503
0000]

S
ymbol
considered as
source for the revision (in
the previous IPC version)

version (*)

version of the IPC

in
YYYYMMDD format e.g.,
200
9
0101

version o
f
the IPC

in
YYYYMM
DD format

Version for which the
IPC
revision is considered

latest

Latest published version of
the IPC

jsonpcallback(*)

If set to a value other than
“none”, this parameter allow
for cross
-
domain call of the
service from JavaScript
en
abled web browsers and
returns a JSON object instead
of an XML fragment


Key

or none

Key

is a value which allow
client and server sides of the
application to identify each
other.

It is more safe to leave the
generation of
Key

to the
client application (see

example below)

In return, the service provides:



Return
-
code

which indicates the number of
“concordance to” symbols found
for the IPC revision

in
dicated by “Version”.



Return
-
code

returns
-
1 if the IPC revision indicated

by “version” is not found
in the sy
stem.

If
jsonpcallback

is set to “none”, this

service returns an XML fragment such as:

<ipc
-
concordance
-
response
>


<
return
-
code
>3</
return
-
code
>


<
concordance

from
-
version="20120101" to
-
version="20130101">




<
from

symbol="A
61G000504
0000"
>


<
to

symb
ol="
A61G0005040000
"
/
>


<
to

symbol="
B62K0005003000
"
/
>


<
to

symbol="
B62K0005023000
"
/
>





</
from
>



</
concordance
>

</ipc
-
concordance
-
response
>

URL and Web Services for IPC Internet Publication


13
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13

Or, in case of unchanged or non
-
valid symbol:

<ipc
-
concordance
-
response
>


<
return
-
code
>0</
return
-
code
>


<
concordance

from
-
version="20120101" to
-
version="20130101">




<
from

symbol="A61
F
"/>




</
concordance
>

</ipc
-
concordance
-
response
>


Documentation for the XML fragment above can be found at
:

http://www.wipo.int/classifications/ipc/en/support/

under “Access current edition:
YYYY.NN
” / “Documentation” / “
Specification of RCL file in
Word format


If
jsonpcallback

is different to “none”, this service returns a JSON object such as:

key
(
{



"
return_
code
": "3",


"
from_
version
": "
2012
0101
",


"
to_
version
": "
20130101
",


"
from_
symbol
":
[
"
A61G000
l
5040000
"
]
,


"
to_
symbols
":
[



["
A61G0005040000
"
]
,



["
B62K0005003000
"
]
,



["
B62K0005003000
"
]


]

}
)

4.

Examples

Some call to IPC i
nternet publication services are illustrated by prototypes available
under
http://www.wipo.int/classifications/ipc/en/ITsupport/prototypes/index.html

.

4.1.

Access to th
e scheme

Show
s

English version of the IPC internet publication scheme in standardized
sequence order for symbol A01N 3/04:

http://www.wipo.int/ipcpub/?versio
n=20100101&symbol=A01N0003040000&

priorityorder=yes

4.2.

Select

IPC symbol through IPC internet publication

a)

Call of the

IPC internet publication

French version with interface:

window.
open(
http://www.wipo.int/ipcpub/?notion=ipc&menulang=
EN&lang=fr&store=symbol
”,”ipcpub”)

b)

An IPC symbol
is expected to

be selected in the IPC internet publication
(the selected symbol is shown in the “Current symbol field”)
.

c
)

The calling we
b
application
call
s

the Get IPC Symbol service to retrieve
the symbol stored
. F
or exam
ple
: using JQuery

to update
a
n element named
“symbol”

with the
IPC S
ymbol

captured
through

a button named

“getsymbol”
:

jQuery
('#getsymbol').click(function () {

var url='h
ttp://www.wipo.int/ipcpub?get=symbol&jsonpcallback=?');

jQuery
.
getJSON(
url
,
function(data){
jQuery
('
#
symbol').val(
data
)
;});

});

URL and Web Services for IPC Internet Publication


14
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13

4.3.

IPC symbol validity
checking

IPC symbol validity checking through call to the IPC internet publication service

4.3.1.

Example using JQ
uery

T
o call the service from
JavaScript

in a web browser and
to
check the validity
of an IPC symbol

A01N0001000000

for
the latest version of the
IPC:

jQuery
.getJSON(
'
http://www
.wipo.int/ipcpub?get=validity&symbol=
A01N&v
ersion=latest&jsonpcallback=?
'
,

func
tion(data){


if(data.classification_validity=='V')



alert('Your symbol is valid
!');


else



alert('Your symbol is NOT valid
!
');

});


4.3.2.

Example using Python

from urllib2 import urlopen

from xml.etree import ElementTree


# Call the service

re
quest

=

urlo
pen(


'
http://www.wipo.int/ipcpub?
get=validity
'
+
\


'
&symbol=A01N0001000000
'+
\


'
&version=20100101
'
+
\


'&jsonpcallback=none'
)


# Load

HTTP
response body into
an
XML
Element Tree

xmltree

=

ElementTree.fromstring(
request
.read()
)


# Find validity e
lement

validity

=

xmltree.find(


'classification
-
ipcr/classification
-
validity')


# Test validity element content

if validity.text == 'V':


print
'Your symbol is valid
!'

else:


print
'Your symbol is NOT valid
!
'

URL and Web Services for IPC Internet Publication


15
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13


4.4.

Get HTML publication of an

IPC XML
definition

Get
IPC A01N

XML definition file
converted into
HTML through a call to IPC
internet publication service
.

4.4.1.

Example using Python



A01N.xml fragment file is prepared:


<?xml version="1.0" encoding="utf
-
8"?>

<IPC
-
DEFINITION IPC="A01N">



<DEFINITION
-
T
ITLE>Preservation of bodies of humans….

….for preventing or destroying rodents, e.g. rats, mice or making them less
harmful.</PARAGRAPH
-
TEXT>




</GLOSSARYOFTERMS>

</IPC
-
DEFINITION>




This XML file is sent through HTTP protocol to the XML2HTML
service and t
he returned HTML file saved to the local storage as
follows:


i
mport httplib2 # see
http://code.google.com/p/httplib2/

xml = open('A01N.xml','
r
')

url =
'http://www.wipo.int/ipcpub?xml2html=definition&lan
g=en&symbol=A01N'

h
ttp = httplib2.Http()

resp,content = http.request(
url
,




body=xml.read(),




headers={'Content
-
Type':'application/xml'})

xml.close()

html = open('A01N.htm'
,'w'
)

html.write(content)

html
.close()


URL and Web Services for IPC Internet Publication


16
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13

The returned

HTML

to be used for viewing
A01N according to IPCPUBPREP
style and layout is as follows
:

<html>

<head>

<meta http
-
equiv="Content
-
Type" content="text/html; charset=utf
-
8">

<title class="trans" id="IPC_Definitions">IPC Definition: A01N</title>

<link rel="stylesheet"
href="
http://www.my
.org
/ipcpub
/
definition
/definition.css"
type="text/css" media="screen,print">

</head>

<body class="defpopup">

<div id="def"><div class="texts"><p class="title"><a name=""
href="index.html?symbol=A01N" target="_blank"
onclick="javascript:goToSymbol(
\
'A01N
\
')
;return false">A01N</a>
-

Definition </p>

</div></body></html>


4.5.

Get

the list of
IPC
concordance
s

for a given symbol

Get the list of IPC concordance
s

for
A61G 5/04 in
IPC revision 2013.01 through call
to the IPC internet publication service

4.5.1.

Example using J
Query

To call the service from JavaScript in a web browser and to
g
et the list of IPC
concordance

to symbol
A61G0005040000 for IPC revision 2013.01
:

jQuery
.getJSON('http://www.wipo.int/ipcpub?get=
concordance
-
to
&symbol=
A61G0005040000
&version=
20130101
&jsonpc
allback=?',

function(data){


if(
pars
e
Int(
data.
return_
code, 10
) > 0
)
{


jQuery
.each(
data
.
to_
symbols
, function(idx, val){


alert(val[0]);


}
)
;


}

});

URL and Web Services for IPC Internet Publication


17
/
19

balecomputer_627a8fbe
-
e344
-
4fc5
-
a502
-
48753352b5c6.doc

04/11/13

4.5.2.

Example using Python

from urllib2 import urlopen

from xml.etree import Eleme
ntTree


# Call the service

request

=

urlopen(


'http://www.wipo.int/ipcpub?get=
concordance
-
to’
+
\


'&symbol=

A61G0005040000
20130101’
+
\


'
&version=
20130101’
+
\


'&jsonpcallback=none')


# Load HTTP response body into an XML Element Tree

xmltree

=

ElementTree.fromstring(request.read())


# Find
“to”

element
s

tos
=

xmltree.find
all
('
concordance
/
from/to
')


#
print concordance symbols

print
', '.join(
[
to
.get('symbol'
)

for to in tos])


End of document