# US 2016/0259764 A1 · Grammar generation for simple datatypes

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

- Number: US 2016/0259764 A1
- Document ID: US20160259764A1
- Status: Published application
- Kind: A1
- Application number: 14/639,852
- Filed: 2015-03-05
- Published: 2016-09-08
- Earliest claimed: 2015-03-05
- Assignees: Fujitsu Limited
- Applicants: Fujitsu Limited
- Inventors: Takuki KAMIYA
- Web page: https://patentgrep.com/patent/US20160259764A1

## CPC

- G06F 40/146: Coding or compression of tree-structured data
- G06F 40/117: Tagging; Marking up (details of markup languages G06F40/143); Designating a block; Setting of attributes (style sheets, e.g. eXtensible Stylesheet Language Transformation [XSLT], G06F40/154)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method may include receiving an extensible markup language schema definition (XSD) including a first element having a first simple datatype and a second element having a second simple datatype different from the first simple datatype. A grammar may be generated based on the XSD. The grammar may be associated with encoding and decoding an extensible markup language (XML) document based on the XSD to and from efficient XML interchange (EXI) streams. The grammar may be associated with the first simple datatype and with the second simple datatype.

## Claims

### Claim 1

A method comprising:
receiving an extensible markup language schema definition (XSD) including a first element having a first simple datatype and a second element having a second simple datatype different from the first simple datatype; and
generating a grammar based on the XSD, the grammar associated with encoding and decoding an extensible markup language (XML) document based on the XSD to and from efficient XML interchange (EXI) streams, the grammar associated with the first simple datatype and with the second simple datatype.

### Claim 2 (depends on 1)

The method of claim 1, wherein the grammar is further generated based on the first simple datatype.

### Claim 3 (depends on 1)

The method of claim 1, wherein the grammar is independent of the first simple datatype and the second simple datatype.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
the XSD further includes a third element having a third simple datatype different from the first simple datatype and different from the third simple datatype; and
the grammar is further associated with the third simple datatype.

### Claim 5 (depends on 1)

The method of claim 1, wherein the grammar is the only grammar associated with any simple datatype of the XSD.

### Claim 6 (depends on 1)

The method of claim 1, further comprising generating a normalization associated with the XSD, the normalization including the grammar.

### Claim 7 (depends on 6)

The method of claim 6, further comprising encoding a first EXI stream from the XML document based on the XSD.

### Claim 8

A method comprising:
receiving an extensible markup language (XML) document based on an XML schema definition (XSD) including a first element having a first simple datatype and a second element having a second simple datatype different from the first simple datatype, the XML document including:
first characters associated with the first element and the first simple datatype; and
second characters associated with the second element and the second simple datatype; and
encoding the XML document as an efficient XML interchange (EXI) stream, including:
encoding the first characters according to a grammar; and
encoding the second characters according to the grammar.

### Claim 9 (depends on 8)

The method of claim 8, wherein the XML document is encoded as an EXI stream according to a normalization including the grammar.

### Claim 10 (depends on 9)

The method of claim 9, wherein the grammar of the normalization is associated with all simple datatypes of the XSD.

### Claim 11 (depends on 8)

The method of claim 8, further comprising adding a first event type identifier to a stack of the EXI stream such that the first event type identifier is associated with the encoded first characters, wherein the first event type identifier is associated with the first element and with the first simple datatype.

### Claim 12 (depends on 11)

The method of claim 11, further comprising adding a second event type identifier to the stack such that the second event type identifier is associated with the encoded second characters, wherein the second event type identifier is associated with the second element and with the second simple datatype.

### Claim 13 (depends on 8)

The method of claim 8, wherein:
the XSD further includes a third element having a third simple datatype different from the first simple datatype and different from the second simple datatype;
the XML document further includes third characters associated with the third element and the third simple datatype; and
encoding the XML document as the EXI stream further includes encoding the third characters according to the grammar.

### Claim 14 (depends on 13)

The method of claim 13, further comprising:
adding a first event type identifier to a stack of the EXI stream such that the first event type identifier is associated with the encoded first characters, wherein the first event type identifier is associated with the first element and with the first simple datatype;
adding a second event type identifier to the stack such that the second event type identifier is associated with the encoded second characters, wherein the second event type identifier is associated with the second element and with the second simple datatype; and
adding a third event type identifier to the stack such that the third event type identifier is associated with the encoded third characters, wherein the third event type identifier is associated with the third element and with the third simple datatype.

### Claim 15

A method comprising:
receiving an efficient extensible markup language interchange (EXI) stream including:
first encoded characters associated with a first simple datatype; and
second encoded characters associated with a second simple datatype different from the first simple datatype;
decoding the EXI stream to form an extensible markup language (XML) document, including:
decoding the first encoded characters based at least in part on a grammar associated with the EXI stream; and
decoding the second encoded characters based at least in part on the grammar.

### Claim 16 (depends on 15)

The method of claim 15, further comprising:
decoding a first event type identifier from a stack of the EXI stream, the first event type identifier associated with the first simple datatype and with the first encoded characters,
wherein decoding the first encoded characters is further based at least in part on a first codec associated with the first simple datatype.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
decoding a second event type identifier from the stack, the second event type identifier associated with the second simple datatype and with the second encoded characters,
wherein decoding the second encoded characters is further based at least in part on a second codec associated with the second simple datatype.

### Claim 18 (depends on 15)

The method of claim 15, wherein the EXI stream is decoded to form the XML document according to a normalization including the grammar.

### Claim 19 (depends on 18)

The method of claim 18, wherein the grammar of the normalization is the only grammar associated with any simple datatype of the EXI stream.

### Claim 20 (depends on 15)

The method of claim 15, wherein:
the EXI stream further includes third encoded characters associated with a third simple datatype different from the first simple datatype and the second simple datatype, and
decoding the EXI stream to form the XML document further includes decoding the third encoded characters based at least in part on the grammar.
