@@ -14,7 +14,7 @@ import { ContentParticle } from "./contentParticle.js";
1414import { DTDChoice } from "./dtdChoice.js" ;
1515import { DTDName } from "./dtdName.js" ;
1616import { DTDPCData } from "./dtdPCData.js" ;
17- import { DTDSecuence } from "./dtdSecuence .js" ;
17+ import { DTDSequence } from "./dtdSequence .js" ;
1818
1919export const Cardinality = {
2020 NONE : 0 , // (exactly one)
@@ -174,7 +174,7 @@ export class ContentModel {
174174 }
175175
176176 isContentParticle ( obj : any ) : boolean {
177- return obj instanceof DTDName || obj instanceof DTDChoice || obj instanceof DTDSecuence || obj instanceof DTDPCData ;
177+ return obj instanceof DTDName || obj instanceof DTDChoice || obj instanceof DTDSequence || obj instanceof DTDPCData ;
178178 }
179179
180180 processGroup ( group : Array < any > ) : ContentParticle {
@@ -189,8 +189,8 @@ export class ContentModel {
189189 if ( obj instanceof DTDChoice ) {
190190 return obj as DTDChoice ;
191191 }
192- if ( obj instanceof DTDSecuence ) {
193- return obj as DTDSecuence ;
192+ if ( obj instanceof DTDSequence ) {
193+ return obj as DTDSequence ;
194194 }
195195 if ( obj instanceof DTDName ) {
196196 return obj as DTDName ;
@@ -212,7 +212,7 @@ export class ContentModel {
212212 if ( sep === null ) {
213213 throw new Error ( 'No separator found when parsing group' ) ;
214214 }
215- let result : ContentParticle = sep === "|" ? new DTDChoice ( ) : new DTDSecuence ( ) ;
215+ let result : ContentParticle = sep === "|" ? new DTDChoice ( ) : new DTDSequence ( ) ;
216216 for ( let obj of group ) {
217217 if ( obj === "|" || obj === "," ) {
218218 continue ;
@@ -221,7 +221,7 @@ export class ContentModel {
221221 result . addParticle ( new DTDName ( obj ) ) ;
222222 } else if ( obj instanceof DTDChoice ) {
223223 result . addParticle ( obj ) ;
224- } else if ( obj instanceof DTDSecuence ) {
224+ } else if ( obj instanceof DTDSequence ) {
225225 result . addParticle ( obj ) ;
226226 } else if ( obj instanceof DTDName ) {
227227 result . addParticle ( obj ) ;
@@ -292,8 +292,8 @@ export class ContentModel {
292292 children . add ( child ) ;
293293 }
294294 }
295- if ( particle instanceof DTDSecuence ) {
296- const sequence = particle as DTDSecuence ;
295+ if ( particle instanceof DTDSequence ) {
296+ const sequence = particle as DTDSequence ;
297297 for ( const child of sequence . getChildren ( ) ) {
298298 children . add ( child ) ;
299299 }
@@ -336,7 +336,7 @@ export class ContentModel {
336336 if ( particle instanceof DTDName ) {
337337 return this . matchNameParticle ( particle , children , start ) ;
338338 }
339- if ( particle instanceof DTDSecuence ) {
339+ if ( particle instanceof DTDSequence ) {
340340 return this . matchSequenceParticle ( particle , children , start ) ;
341341 }
342342 if ( particle instanceof DTDChoice ) {
@@ -363,7 +363,7 @@ export class ContentModel {
363363 return index ;
364364 }
365365
366- private matchSequenceParticle ( sequence : DTDSecuence , children : string [ ] , start : number ) : number {
366+ private matchSequenceParticle ( sequence : DTDSequence , children : string [ ] , start : number ) : number {
367367 const min :number = this . getMinOccurs ( sequence . getCardinality ( ) ) ;
368368 const max : number = this . getMaxOccurs ( sequence . getCardinality ( ) ) ;
369369 let index : number = start ;
@@ -416,7 +416,7 @@ export class ContentModel {
416416 return index ;
417417 }
418418
419- private matchSequenceOnce ( sequence : DTDSecuence , children : string [ ] , start : number ) : number {
419+ private matchSequenceOnce ( sequence : DTDSequence , children : string [ ] , start : number ) : number {
420420 let index :number = start ;
421421 for ( const subParticle of sequence . getParticles ( ) ) {
422422 const nextIndex : number = this . matchParticle ( subParticle , children , index ) ;
0 commit comments