# US 2012/0254724 A1 · Encoder compiler, computer readable medium, and communication device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0254724 A1
- Document ID: US20120254724A1
- Status: Published application
- Kind: A1
- Application number: 13/235,834
- Filed: 2011-09-19
- Published: 2012-10-04
- Earliest claimed: 2011-03-28
- Assignees: Kabushiki Kaisha Toshiba
- Inventors: Yusuke DOI
- Web page: https://patentgrep.com/patent/US20120254724A1

## CPC

- G06F 40/221: Parsing markup language streams (streaming G06F40/149)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The reading unit reads mapping information that maps a particular point in a document structure defined by XML schema to the name of a variable and a training XML document that includes a substitute character string positioned at a particular point and tags. A parser converts the training XML document into a sequence of events each specifying one of substitute character string and the tag names. The reading unit reads in an EXI grammar form. A code composer processes the sequence of events and generates an EXI event code based on the EXI grammar form, generates a function to retrieve the value of a variable mapped to the particular point at which the substitute character string is positioned when the event is an event specifying substitute character string, and produces an EXI encoder including output instruction codes to output EXI event codes and the retrieved value of the function.

## Claims

### Claim 1

An encoder compiler that produces an EXI encoder, the EXI encoder generating an EXI (Efficient XML (Extensible Markup Language) Interchange) stream, comprising:
a first reading unit configured to read mapping information that maps a particular point in a document structure defined by XML schema to a name of a variable;
a second reading unit configured to read a training XML document, the training XML document including a substitute character string positioned at the particular point and a plurality of tags having at least tag names;
a parser configured to convert the training XML document into a sequence of events each of which specifies one of the substitute character string and the tag names;
a third reading unit configured to read an EXI grammar form defining relationship between inter-event transition and EXI event code; and
a code composer configured to:
(A) sequentially process the sequence of events and generate EXI event codes in accordance with the EXI grammar;
(B) when an event being processed is an event which specifies the substitute character string, generate a function which retrieves a value of the variable mapped to the particular point at which the substitute character string is positioned; and
(C) produce an EXI encoder by arranging output instruction codes for the EXI event codes and output instruction codes for the value of the function in accordance with an order of sequence processing of the events.

### Claim 2 (depends on 1)

The compiler according to claim 1, wherein the function further is configured to convert the retrieved value into a format conforming to the XML schema.

### Claim 3 (depends on 1)

The compiler according to claim 1, wherein the substitute character string is described in a portion surrounded by tags.

### Claim 4 (depends on 1)

The compiler according to claim 1, wherein
each of the tags in the training XML document has an attribute, and
the substitute character string is described as an attribute value.

### Claim 5 (depends on 1)

The compiler according to claim 1, wherein
the parser is an SAX parser, and
the events are SAX events.

### Claim 6 (depends on 1)

The compiler according to claim 1, wherein the variable is an element of a structure.

### Claim 7 (depends on 1)

The compiler according to claim 1, wherein
the mapping information uses a tag name to specify a range in the training XML document in which the particular point is included, and
the code composer divides the sequence of events into a body portion corresponding to the range, a head portion preceding the body portion, and a tail portion following the body portion to perform processing for each of the head portion, the body portion and the tail portion, and concatenates output instruction codes resulting from each processing of the head portion, the body portion and the tail portion to produce the EXI encoder.

### Claim 8

A non-transitory computer readable medium storing a program for producing an EXI encoder which generates an EXI (Efficient XML (Extensible Markup Language) Interchange) stream, the program, when executed by a computer, causing the computer to perform steps comprising:
reading-in mapping information that maps a particular point in a document structure defined by XML schema to a name of a variable;
reading-in a training XML document that includes a substitute character string positioned at the particular point and a plurality of tags having at least tag names;
converting the training XML document into a sequence of events each of which specifies one of the substitute character string and the tag names;
reading-in an EXI grammar form defining relationship between inter-event transition and EXI event code; and
sequentially processing the sequence of events and generate EXI event codes in accordance with the EXI grammar;
when an event being processed is an event which specifies the substitute character string, generating a function which retrieves a value of the variable mapped to the particular point at which the substitute character string is positioned; and
producing an EXI encoder by arranging output instruction codes for the EXI event codes and output instruction codes for the value of the function in accordance with an order of processing of the events.

### Claim 9 (depends on 1)

A communication device comprising:
an EXI encoder produced by the encoder compiler according to claim 1;
a storage unit configured to store a value of a variable; and
an encoder executing unit configured to execute the EXI encoder to generate an EXI stream, the EXI stream being a sequence of EXI event codes and the value of the variable.
