# US 2016/0259763 A1 · Grammar generation for augmented datatypes

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

- Number: US 2016/0259763 A1
- Document ID: US20160259763A1
- Status: Published application
- Kind: A1
- Application number: 14/639,820
- 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/US20160259763A1

## CPC

- G06F 40/146: Coding or compression of tree-structured data
- G06F 40/143: Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
- G06F 40/149: Adaptation of the text data for streaming purposes, e.g. Efficient XML Interchange [EXI] format
- G06F 40/154: Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
- G06F 40/221: Parsing markup language streams (streaming G06F40/149)
- 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 multiple elements having a datatype. Each of the multiple elements may include an attribute profile defining a presence or an absence of at least one attribute. A first two or more of the multiple elements may include a first particular attribute profile. The method may further include generating a first grammar based on the XSD. The first grammar may be associated with encoding and decoding extensible markup language (XML) documents based on the XSD to and from efficient XML interchange (EXI) streams. The first grammar may also be associated with the first particular attribute profile. The method may further include associating each of the first two or more of the multiple elements with the first grammar.

## Claims

### Claim 1

A method comprising:
receiving an extensible markup language schema definition (XSD) including a plurality of elements having a datatype, each of the plurality of elements including an attribute profile defining a presence or an absence of at least one attribute, and a first two or more of the plurality of elements including a first particular attribute profile;
generating a first grammar based on the XSD, the first grammar being associated with encoding and decoding extensible markup language (XML) documents based on the XSD to and from efficient XML interchange (EXI) streams, the first grammar also being associated with the first particular attribute profile; and
associating each of the first two or more of the plurality of elements with the first grammar.

### Claim 2 (depends on 1)

The method of claim 1, wherein the at least one attribute of the attribute profile includes a typable attribute.

### Claim 3 (depends on 1)

The method of claim 1, wherein the at least one attribute of the attribute profile includes a nillable attribute.

### Claim 4 (depends on 1)

The method of claim 1, wherein a second two or more of the plurality of elements include a second particular attribute profile, and the method further comprises:
generating a second grammar based on the XSD, the second grammar being associated with the second particular attribute profile; and
associating each of the second two or more of the plurality of elements with the second grammar.

### Claim 5 (depends on 4)

The method of claim 4, wherein:
the first particular attribute profile is associated with the absence of the first attribute and the absence of the second attribute;
the second particular attribute profile is associated with the presence of at least one of the first attribute and the second attribute; and
the first grammar is a proto-grammar associated with the datatype of the plurality of elements.

### Claim 6 (depends on 4)

The method of claim 4, wherein a third two or more of the plurality of elements include a third particular attribute profile, and the method further comprises:
generating a third grammar based on the XSD, the third grammar associated with the third particular attribute profile; and
associating each of the third two or more of the plurality of elements with the third grammar.

### Claim 7 (depends on 6)

The method of claim 6, wherein a fourth two or more of the plurality of elements include a fourth particular attribute profile, and the method further comprises:
generating a fourth grammar based on the XSD, the fourth grammar associated with the fourth particular attribute profile; and
associating each of the fourth two or more of the plurality of elements with the fourth grammar.

### Claim 8 (depends on 7)

The method of claim 7, wherein:
the attribute profile of each of the plurality of elements defines the presence or the absence of a first attribute and the presence or the absence of a second attribute;
the first particular attribute profile is associated with the absence of the first attribute and the absence of the second attribute;
the second particular attribute profile is associated with the absence of the first attribute and the presence of the second attribute;
the third particular attribute profile is associated with the presence of the first attribute and the absence of the second attribute; and
the fourth particular attribute profile is associated with the presence of the first attribute and the presence of the second attribute.

### Claim 9 (depends on 8)

The method of claim 8, wherein:
the first attribute includes a typable attribute; and
the second attribute includes a nillable attribute.

### Claim 10

A method comprising:
receiving an extensible markup language (XML) document based on an XML schema definition (XSD) including a plurality of elements having a datatype, each of the plurality of elements including an attribute profile defining a presence or an absence of at least one attribute, and a first element and a second element of the plurality of elements, each including a first particular attribute profile, the XML document including:
first characters associated with the first element and the first particular attribute profile; and
second characters associated with the second element and the first particular attribute profile; and
encoding the XML document as an efficient XML interchange (EXI) stream, including:
encoding the first characters according to a first grammar; and
encoding the second characters according to the first grammar.

### Claim 11 (depends on 10)

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

### Claim 12 (depends on 10)

The method of claim 10, wherein:
the XSD further includes a third element and a fourth element of the plurality of elements, each including a second particular attribute profile;
the XML document further includes:
third characters associated with the third element and the second particular attribute profile; and
fourth characters associated with the fourth element and the second particular attribute profile; and
encoding the XML document as an EXI stream further includes:
encoding the third characters according to a second grammar; and
encoding the fourth characters according to the second grammar.

### Claim 13 (depends on 12)

The method of claim 12, wherein:
the XSD further includes:
a fifth element and a sixth element of the plurality of elements, each including a third particular attribute profile;
a seventh element and an eighth element of the plurality of elements, each including a fourth particular attribute profile;
the XML document further includes:
fifth characters associated with the fifth element and the third particular attribute profile;
sixth characters associated with the sixth element and the third particular attribute profile;
seventh characters associated with the seventh element and the fourth particular attribute profile; and
eighth characters associated with the eighth element and the fourth particular attribute profile; and
encoding the XML document as an EXI stream further includes:
encoding the fifth characters according to a third grammar;
encoding the sixth characters according to the third grammar;
encoding the seventh characters according to a fourth grammar; and
encoding the eighth characters according to the fourth grammar.

### Claim 14 (depends on 13)

The method of claim 13, wherein:
the attribute profile of each of the plurality of elements defines the presence or the absence of a first attribute and the presence or the absence of a second attribute;
the first particular attribute profile is associated with the absence of the first attribute and the absence of the second attribute;
the second particular attribute profile is associated with the absence of the first attribute and the presence of the second attribute;
the third particular attribute profile is associated with the presence of the first attribute and the absence of the second attribute; and
the fourth particular attribute profile is associated with the presence of the first attribute and the presence of the second attribute.

### Claim 15 (depends on 14)

The method of claim 14, wherein:
the first attribute includes a typable attribute; and
the second attribute includes a nillable attribute.

### Claim 16

A method comprising:
receiving an efficient extensible markup language interchange (EXI) stream including:
first encoded characters associated with a datatype and a first element including a first particular attribute profile; and
second encoded characters associated with the datatype and a second element including the first particular attribute profile; and
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 first grammar associated with the first particular attribute profile; and
decoding the second encoded characters based at least in part on the first grammar.

### Claim 17 (depends on 16)

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

### Claim 18 (depends on 16)

The method of claim 16, wherein:
the EXI stream further includes:
third encoded characters associated with the datatype and a second element including a second particular attribute profile; and
fourth encoded characters associated with the datatype and a third element including the second particular attribute profile; and
decoding the EXI stream to form the XML document further includes:
decoding the third encoded characters based at least in part on a second grammar associated with the second particular attribute profile; and
decoding the fourth encoded characters based at least in part on the second grammar.

### Claim 19 (depends on 16)

The method of claim 16, wherein:
the EXI stream further includes:
fifth encoded characters associated with the datatype and a fifth element including a third particular attribute profile;
sixth encoded characters associated with the datatype and a sixth element including the third particular attribute profile;
seventh encoded characters associated with the datatype and a seventh element including a fourth particular attribute profile; and
eighth encoded characters associated with the datatype and an eighth element including the fourth particular attribute profile; and
decoding the EXI stream to form the XML document further includes:
decoding the fifth encoded characters based at least in part on a third grammar associated with the third particular attribute profile;
decoding the sixth encoded characters based at least in part on the third grammar;
decoding the seventh encoded characters based at least in part on a fourth grammar associated with the fourth particular attribute profile; and
decoding the eighth encoded characters based at least in part on the fourth grammar.

### Claim 20 (depends on 16)

The method of claim 16, wherein:
the attribute profile of each of the plurality of elements defines the presence or the absence of a first attribute and the presence or the absence of a second attribute;
the first particular attribute profile is associated with the absence of the first attribute and the absence of the second attribute;
the second particular attribute profile is associated with the absence of the first attribute and the presence of the second attribute;
the third particular attribute profile is associated with the presence of the first attribute and the absence of the second attribute; and
the fourth particular attribute profile is associated with the presence of the first attribute and the presence of the second attribute.

### Claim 21

A non-transitory computer-readable medium having encoded therein programming code executable by a processor to perform operations comprising:
receiving an extensible markup language schema definition (XSD) including a plurality of elements having a datatype, each of the plurality of elements including an attribute profile defining a presence or an absence of at least one attribute, and a first two or more of the plurality of elements including a first particular attribute profile;
generating a first grammar based on the XSD, the first grammar associated with encoding and decoding extensible markup language (XML) documents based on the XSD to and from efficient XML interchange (EXI) streams, the first grammar associated with the first particular attribute profile; and
associating each of the first two or more of the plurality of elements with the first grammar.
