/[suikacvs]/messaging/manakai/lib/Message/Util/DIS.dis
Suika

Contents of /messaging/manakai/lib/Message/Util/DIS.dis

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Sun Feb 27 14:27:56 2005 UTC (20 years, 4 months ago) by wakaba
Branch: MAIN
Changes since 1.4: +488 -58 lines
lib/Message/Util/DIS.dis: loadFor implemented; loadResource added (but not work yet); lib/Message/Markup/SuikaWikiConfig21.dis: Binding expantion bug fixed; *.dis: QName attribute added to Module/Require elements

1 wakaba 1.1 Module:
2     @QName:
3     Util:DIS
4     @FullName:
5     @@lang: en
6     @@@:
7     <QUOTE::DIS> Object Model
8     @Namespace:
9     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS#
10    
11     @Description:
12     @@lang:en
13     @@@:
14     This module provides an object model for <QUITE::dis> document format.
15    
16     @Author:
17     @@FullName: Wakaba
18     @@Mail: w@suika.fam.cx
19     @License:
20     @@@:
21     license:Perl+MPL
22     @@Original:
23     @@@FullName:
24     manakai <CODE::lib/manakai/dis.pl>
25     @@@Year:2004
26     @@@Author:
27     @@@@FullName:Wakaba
28     @@@@Mail:w@suika.fam.cx
29     @Date:
30     @@@:
31 wakaba 1.5 $Date: 2005/02/26 11:35:51 $
32 wakaba 1.1 @@ContentType:
33     dis:Date.RCS
34    
35     @Require:
36     @@Module:
37     @@@Name: SuikaWikiConfig21
38 wakaba 1.5 @@@QName:
39     Markup:SuikaWikiConfig21
40 wakaba 1.1 @@@WithFor:
41 wakaba 1.3 swcfg21:ForLatest
42     @@Module:
43     @@@Name: DIS
44     @@@WithFor:
45     DIS:ForLatest
46    
47     @DefaultFor:
48     DIS:ForLatest
49 wakaba 1.1
50     Namespace:
51     @DIS:
52     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS#
53     @dis:
54     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis--
55     @dis2pm:
56     http://suika.fam.cx/~wakaba/archive/2004/11/8/dis2pm#
57 wakaba 1.5 @DISlib:
58     http://suika.fam.cx/~wakaba/archive/2004/dis/
59 wakaba 1.3 @DOMCore:
60     http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#
61     @DOMLS:
62     http://suika.fam.cx/~wakaba/archive/2004/dom/ls#
63     @DOMMain:
64     http://suika.fam.cx/~wakaba/archive/2004/dom/main#
65     @infoset:
66     http://www.w3.org/2001/04/infoset#
67 wakaba 1.1 @lang:
68     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#
69     @license:
70     http://suika.fam.cx/~wakaba/archive/2004/8/18/license#
71     @ManakaiDOM:
72     http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#
73 wakaba 1.5 @Markup:
74     http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup#
75 wakaba 1.3 @MDOMX:
76     http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#
77 wakaba 1.1 @owl:
78     http://www.w3.org/2002/07/owl#
79     @Perl:
80     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#Perl--
81     @rdf:
82     http://www.w3.org/1999/02/22-rdf-syntax-ns#
83     @rdfs:
84     http://www.w3.org/2000/01/rdf-schema#
85 wakaba 1.3 @swcfg21:
86     http://suika.fam.cx/~wakaba/archive/2005/swcfg21#
87 wakaba 1.1 @TreeCore:\
88     @Util:
89     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/
90    
91     ## -- "For" definitions
92    
93     ForDef:
94     @QName:
95     DIS:ForLatest
96     @Description:
97     @@lang:en
98     @@@:
99     For latest version of the <Module::Util:DIS> module implementation
100     @ISA:
101     ManakaiDOM:Perl
102    
103     ## -- Features
104    
105     ElementTypeBinding:
106     @Name: FeatureDef
107     @ElementType:
108     dis:ResourceDef
109     @ShadowContent:
110     @@rdf:type:
111     DOMMain:DOMFeature
112     @@AliasFor:
113     @@@@:
114     ::ManakaiDOM:all
115     @@@For:
116     !=ManakaiDOM:all
117    
118     ElementTypeBinding:
119     @Name: FeatureVerDef
120     @ElementType:
121     dis:ResourceDef
122     @ShadowContent:
123     @@rdf:type:
124     DOMMain:DOMFeature
125    
126     ElementTypeBinding:
127     @Name: featureQName
128     @ElementType:
129     dis:AppName
130     @ShadowContent:
131     @@ContentType:
132     dis:TypeQName
133    
134     FeatureDef:
135     @QName: Core
136     @FeatureVerDef:
137     @@QName: CoreFeature10
138     @@Version: 1.0
139     @@ISA: Core
140     @@FullName:
141     @@@lang:en
142     @@@@:
143     The <QUOTE::dis> object model, version 1.0
144     @@Description:
145     @@@lang:en
146     @@@@:
147     The <QUOTE::dis> object model, version 1.0.
148     @@DOMMain:requireFeature:
149     swcfg21:CoreFeature21
150    
151     ## -- SuikaWikiConfig/2.1 extended classes
152    
153     ClsDef:
154     @ClsQName: ManakaiDISImplementation
155     @ClsISA:
156 wakaba 1.3 swcfg21:ManakaiSWCFGImplementation::swcfg21:ForLatest
157 wakaba 1.1 @Description:
158     @@lang:en
159     @@@:
160     A <QUOTE::dis> implementation object.
161    
162     @Method:
163     @@Name: createDISDocument
164     @@Description:
165     @@@lang:en
166     @@@@:
167     Creates an empty <Class::ManakaiDISDocument> object.
168     @@Return:
169     @@@Type:ManakaiDISDocument
170     @@@Description:
171     @@@@lang:en
172     @@@@@:
173     The newly created <QUOTE::dis> document object.
174     @@@PerlDef:
175 wakaba 1.3 $r = $self-><M::swcfg21:SWCFGImplementation::swcfg21:ForLatest
176     .createSWCFGDocument>;
177     $r-><AS::swcfg21:SWCFGDocument::swcfg21:ForLatest
178     .defaultElementTypeNamespaceURI>
179 wakaba 1.1 (<Q::dis:>);
180    
181     @Method:
182 wakaba 1.2 @@Name: createDISParser
183     @@Description:
184     @@@lang:en
185     @@@@:
186 wakaba 1.1 Creates a <Class::ManakaiDISParser> object.
187 wakaba 1.2 @@Return:
188     @@@Type: ManakaiDISParser
189     @@@Description:
190     @@@@lang:en
191     @@@@@:
192 wakaba 1.1 A newly created <QUOTE::dis> parser.
193 wakaba 1.2 @@@PerlDef:
194 wakaba 1.3 $r = bless $self-><M::swcfg21:SWCFGImplementation::swcfg21:ForLatest
195     .createSWCFGParser>,
196 wakaba 1.1 <ClassName::ManakaiDISParser>;
197    
198     @Method:
199 wakaba 1.2 @@Name: createDISDatabase
200 wakaba 1.1 @@Description:
201     @@@lang:en
202     @@@@:
203 wakaba 1.2 Creates a new <QUOTE::dis> database.
204 wakaba 1.1 @@Return:
205 wakaba 1.2 @@@Type:ManakaiDISDatabase
206 wakaba 1.4 @@@Description:
207     @@@@lang:en
208     @@@@@:
209 wakaba 1.2 A newly created <QUOTE::dis> parser.
210 wakaba 1.4 @@@PerlDef:
211 wakaba 1.2 $r = bless {
212     forDef => {
213 wakaba 1.5 <Q::ManakaiDOM:all> => bless ({
214 wakaba 1.2 uri => <Q::ManakaiDOM:all>,
215     isa => {<Q::ManakaiDOM:all> => 1},
216     revISA => {},
217 wakaba 1.5 }, <ClassName::ManakaiDISForDefinition>),
218 wakaba 1.2 },
219     resDef => {},
220 wakaba 1.3 }, <ClassName::ManakaiDISDatabase>;
221    
222     @Method:
223     @@Name: tfurisToURI
224     @@Description:
225     @@@lang:en
226     @@@@:
227     Converts a pair of name URI reference and <QUOTE::for> URI reference
228     into a <TYPE::dis:TFQNames>-expanded URI reference.
229     @@Param:
230     @@@Name: typeURI
231     @@@Type: NameURI
232     @@@Description:
233     @@@@lang:en
234     @@@@@:
235     A URI reference to identify a resource.
236     @@@InCase:
237     @@@@Value:
238     @@@@@is-null:1
239     @@@@Description:
240     @@@@@lang:en
241     @@@@@@:
242     Equivalent to <Q::DOMMain:any> (for historical reason).
243     @@Param:
244     @@@Name: forURI
245     @@@Type: ForURI
246     @@@Description:
247     @@@@lang:en
248     @@@@@:
249     A <QUOTE::for> URI reference.
250     @@@InCase:
251     @@@@Value:
252     @@@@@is-null:1
253     @@@@Description:
254     @@@@@lang:en
255     @@@@@@:
256     Equivalent to <QUOTE::for all>, i.e. <Q::ManakaiDOM:all>.
257     @@Return:
258     @@@Type:
259     DISCore:TFURI::ManakaiDOM:all
260     @@@Description:
261     @@@@lang:en
262     @@@@@:
263     The <TYPE::dis:TFQNames>-expanded URI references.
264     @@@PerlDef:
265     $typeURI = <Q::DOMMain:any> unless defined $typeURI;
266     $forURI = <Q::ManakaiDOM:all> unless defined $forURI;
267 wakaba 1.4 __CODE{tfurisToURI:: $turi => $typeURI, $furi => $forURI, $uri => $r}__;
268    
269     @ResourceDef:
270     @@QName: tfurisToURI
271     @@rdf:type:
272     dis2pm:BlockCode
273     @@enDesc:
274     Converts a pair of name URI reference and <QUOTE::for> URI reference
275     into a <TYPE::dis:TFQNames>-expanded URI reference.
276     @@PerlDef:
277     if ($furi eq <Q::ManakaiDOM:all>) {
278     $uri = $turi;
279 wakaba 1.3 } else {
280     ## NOTE: [RFC 3986]
281     ## fragment := *(pchar / "/" / "?")
282     ## pchar := unreserved / pct-encoded / sub-delims / [:@]
283     ## unreserved := ALPHA / DIGIT / [._~-]
284     ## sub-delims := [!$&'()*+,;=]
285     ## NOTE: [XPointer Framework]
286     ## SchemeData := *EscapedData
287     ## EscapedData := NormalChar / "^(" / "^)" / "^^"
288     ## / "(" SchemeData ")"
289     ## NormalChar := UnicodeChar - [()^]
290 wakaba 1.5 my $__turi = $turi;
291     my $__furi = $furi;
292     for my $__uri ($__turi, $__furi) {
293 wakaba 1.4 $__uri =~ s{([^0-9A-Za-z:;?=_./-])}{sprintf '%%%02X', ord $1}ge;
294 wakaba 1.3 }
295 wakaba 1.4 $uri = qq<data:,200411tf#xmlns(t=data:,200411tf%23)>.
296 wakaba 1.5 qq<t:tf($__turi,$__furi)>;
297 wakaba 1.3 }
298 wakaba 1.2
299 wakaba 1.5 @ResourceDef:
300     @@QName: getChildResourceURI
301     @@rdf:type:
302     dis2pm:BlockCode
303     @@enDesc:
304     Gets an anonymous URI reference of a child resource of another
305     resource.
306     @@PerlDef:
307     my $__parent = $parentURI;
308     my $__ln = $localName;
309     for my $__uri ($__parent, $__ln) {
310     $__uri =~ s{([^0-9A-Za-z:;?=_./~-])}{sprintf '%%%02X', ord $1}ge;
311     }
312     $result = q<data:,200411tf#xmlns(t=data:,200411tf%23)>.
313     qq<t:child($__parent,$__ln)>;
314    
315 wakaba 1.1 ##DISImplementation
316    
317     ClsDef:
318     @ClsQName: ManakaiDISParser
319     @ClsISA:
320 wakaba 1.3 swcfg21:ManakaiSWCFGParser::swcfg21:ForLatest
321 wakaba 1.1 @Description:
322     @@lang:en
323     @@@:
324     A SuikaWikiConfig/2.1 parser that returns <QUOTE::dis> object.
325     @Method:
326 wakaba 1.3 @@Name: parse
327     @@Description:
328     @@@lang:en
329     @@@@:
330 wakaba 1.1 Parses a <QUOTE::dis> document and returns it as an object tree.
331 wakaba 1.3 @@Param:
332     @@@Name: input
333     @@@Type:
334     DOMLS:LSInput::ManakaiDOM:ManakaiDOM3
335     @@@Description:
336     @@@@lang:en
337     @@@@@:
338 wakaba 1.1 The input source.
339 wakaba 1.3 @@Return:
340     @@@Type: ManakaiDISDocument
341     @@@Description:
342     @@@@lang:en
343     @@@@@:
344 wakaba 1.1 The <QUOTE::dis> document object created from the <P::input>.
345     @@@RaiseException:
346     @@@@@:
347     swcfg21:SWCFG_PARSE_ERR
348     @@@@Description:
349     @@@@@lang:en
350     @@@@@@:
351     The <IF::swcfg21:SWCFGParser> was unable to load the SuikaWikiConfig
352     document.
353     @@@PerlDef:
354     __DEEP{
355 wakaba 1.3 $r = $self-><M::swcfg21:ManakaiSWCFGParser
356     ::swcfg21:ForLatest.parse> ($input);
357 wakaba 1.1 }__;
358     if (defined $r) {
359     $r = bless $r, <ClassName::ManakaiDISDocument>;
360 wakaba 1.4 $r-><AS::swcfg21:SWCFGDocument::swcfg21:ForLatest
361     .defaultElementTypeNamespaceURI>
362     (<Q::dis:>);
363 wakaba 1.1 }
364     ##DISParser
365    
366     ClsDef:
367     @ClsQName: ManakaiDISNode
368     @ClsISA:
369 wakaba 1.3 swcfg21:ManakaiSWCFGNode::swcfg21:ForLatest
370 wakaba 1.1 @Description:
371     @@lang:en
372     @@@:
373     <QUOTE::dis> node objects.
374    
375     @MethodRedef:
376     @@Name:lookupNamespacePrefix
377     @@Description:
378     @@@lang:en
379     @@@@:
380     Looks up the namespace prefix associated to the given
381     namespace URI. The default namespaces are ignored.
382     @@Param:
383     @@@Name:namespaceURI
384 wakaba 1.3 @@@Type: AnyURI
385 wakaba 1.1 @@@Description:
386     @@@@lang:en
387     @@@@@:
388     The namespace URI to look for.
389     @@@InCase:
390     @@@@Value:
391     @@@@@is-null:1
392     @@@@Description:
393     @@@@@lang:en
394     @@@@@@:
395     The <DOM::null> namespace.
396     @@NamedParam:
397     @@@Name: makeNewBinding
398     @@@Type:
399     DOMMain:boolean
400     @@@Description:
401     @@@@lang:en
402     @@@@@:
403     Whether a new namespace prefix should be bound when
404     no namespace URI has been associated yet.
405     @@@InCase:
406     @@@@Value:true
407     @@@@Description:
408     @@@@@lang:en
409     @@@@@@:
410     New binding is made if no prefix associated.
411     @@@InCase:
412     @@@@Value:false
413     @@@@Description:
414     @@@@@lang:en
415     @@@@@@:
416     Simply returns the <DOM::null> if no prefix associated.
417     @@Return:
418     @@@Type:
419 wakaba 1.3 DISCore:NamespacePrefix::ManakaiDOM:all
420 wakaba 1.1 @@@Description:
421     @@@@lang:en
422     @@@@@:
423     An associated namespace prefix. If more than one prefix
424     are associated to the namespace URI, the returned prefix
425     is implementation dependent.
426     @@@InCase:
427     @@@@Value:
428     @@@@@is-null:1
429     @@@@Description:
430     @@@@@lang:en
431     @@@@@@:
432     No associated namespace prefix found.
433     @@@PerlDef:
434     $r = null;
435 wakaba 1.3 my $od = $self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
436     .ownerDocument> || $self;
437 wakaba 1.1 my $binds = $od->{<Q::TreeCore:node>}->{<Q::nsBinding>};
438     if (defined $namespaceURI) {
439     FIND: {
440     for my $prefix (keys %$binds) {
441     if (defined $binds->{$prefix} and
442     $binds->{$prefix} eq $namespaceURI) {
443     $r = $prefix;
444     last FIND;
445     }
446     }
447     last FIND unless $makeNewBinding;
448     ## Not found
449     if ($namespaceURI =~ /(\w+)$/) {
450     my $prefix = $1;
451     unless (exists $binds->{$prefix}) {
452     $binds->{$prefix} = $namespaceURI;
453     $r = $prefix;
454     last FIND;
455     }
456     }
457     my $i = 1;
458     {
459     unless (exists $binds->{'ns'.$i}) {
460     $binds->{$r = 'ns'.$i} = $namespaceURI;
461     last FIND;
462     }
463     $i++;
464     redo;
465     }
466     } # FIND
467     } else { ## Null namespace
468     FIND: {
469     if (exists $binds->{'nu'.'ll'} and not defined $binds->{'nu'.'ll'}) {
470     $r = 'nu'.'ll';
471     last FIND;
472     }
473     for my $prefix (keys %$binds) {
474     if (not defined $prefix) {
475     $r = $prefix;
476     last FIND;
477     }
478     }
479     last FIND unless $makeNewBinding;
480     ## Not found
481     my $i = '';
482     {
483     unless (exists $binds->{'nu'.'ll'.$i}) {
484     $binds->{$r = 'nu'.'ll'.$i} = null;
485     last FIND;
486     }
487     $i++;
488     redo;
489     }
490     }
491     }
492     ## TODO: Module ns support
493    
494     @MethodRedef:
495     @@Name:lookupNamespaceURI
496     @@Description:
497     @@@lang:en
498     @@@@:
499     Looks up the namespace URI associated to the given prefix.
500     @@Param:
501     @@@Name:prefix
502     @@@Type:
503 wakaba 1.3 DISCore:NamespacePrefix::ManakaiDOM:all
504 wakaba 1.1 @@@Description:
505     @@@@lang:en
506     @@@@@:
507     The namespace URI to look for.
508     @@NamedParam:
509     @@@Name: makeNewBinding
510     @@@Type:
511     DOMMain:boolean
512     @@@Description:
513     @@@@lang:en
514     @@@@@:
515     Whether a new binding should be created if no namespace URI
516     is associated with the <P::prefix> or not.
517     @@@InCase:
518     @@@@Value:true
519     @@@@Description:
520     @@@@@lang:en
521     @@@@@@:
522     A new binding to the temporary namespace URI
523     exactly same as <P::prefix> is created
524     if no binding found.
525     @@@InCase:
526     @@@@Value:false
527     @@@@Description:
528     @@@@@lang:en
529     @@@@@@:
530     No new binding is created if no binding found. Note that
531     even if no association newly created, this method
532     returns the <DOM::null> value.
533     @@Return:
534 wakaba 1.3 @@@Type: AnyURI
535 wakaba 1.1 @@@Description:
536     @@@@lang:en
537     @@@@@:The associated namespace URI.
538     @@@InCase:
539     @@@@Value:
540     @@@@@is-null:1
541     @@@@Description:
542     @@@@@lang:en
543     @@@@@@:
544 wakaba 1.3 No namespace URI is associated to the prefix or
545 wakaba 1.1 the <DOM::null> namespace is associated.
546     @@@PerlDef:
547 wakaba 1.3 my $od = $self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
548     .ownerDocument> || $self;
549 wakaba 1.1 my $binds = $od->{<Q::TreeCore:node>}->{<Q::nsBinding>};
550     if (exists $binds->{$prefix}) {
551     $r = $binds->{$prefix};
552     } elsif ($makeNewBinding) {
553     $r = $binds->{$prefix} = $prefix;
554     } else {
555     $r = null;
556     }
557     ## TODO: Module ns support
558    
559     @IntMethod:
560     @@Name:getNodeReference
561     @@Description:
562     @@@lang:en
563     @@@@:
564     Returns a new reference to the node object.
565     @@ManakaiDOM:isStatic:1
566     @@Param:
567     @@@Name:object
568     @@@Type:
569     ManakaiDOM:ManakaiDOMNodeObject::ManakaiDOM:Perl
570     @@@Description:
571     @@@@lang:en
572     @@@@@:
573     The node object to be referred.
574     @@Return:
575     @@@Type: ManakaiDISNode
576     @@@Description:
577     @@@@lang:en
578     @@@@@:
579     A newly created reference.
580     @@@PerlDef:
581     my $class;
582 wakaba 1.5 if ($object->{<Q::swcfg21:nodeType>} eq '#element') {
583 wakaba 1.1 $class = <ClassName::ManakaiDISElement>;
584 wakaba 1.5 } elsif ($object->{<Q::swcfg21:nodeType>} eq '#comment') {
585 wakaba 1.1 $class = <ClassName::ManakaiDISComment>;
586 wakaba 1.5 } elsif ($object->{<Q::swcfg21:nodeType>} eq '#document') {
587 wakaba 1.1 $class = <ClassName::ManakaiDISDocument>;
588 wakaba 1.5 } elsif ($object->{<Q::swcfg21:nodeType>} eq '#fragment') {
589 wakaba 1.1 $class = <ClassName::ManakaiDISDocumentFragment>;
590     } else {
591     __ASSERT{DISPerl:invariant::
592 wakaba 1.5 msg => {qq[Node type: "$object->{<Q::swcfg21:nodeType>}" ].
593 wakaba 1.1 qq[(ref: "@{[ref $object]}")]},
594     }__;
595     }
596     $r = $object-><M::ManakaiDOM:ManakaiDOMNodeObject::ManakaiDOM:Perl
597     .newReference> ($class);
598    
599 wakaba 1.2 @Attr:
600     @@Name:ownerDISDocument
601     @@Description:
602     @@@lang:en
603     @@@@:
604     The <QUOTE::dis> document object associated with this node.
605     @@Get:
606 wakaba 1.3 @@@Type:ManakaiDISDocument
607 wakaba 1.2 @@@Description:
608     @@@@lang:en
609     @@@@@:
610     The document object associated with this node.
611     @@@InCase:
612     @@@@Value:
613     @@@@@is-null:1
614     @@@@Description:
615     @@@@@lang:en
616     @@@@@@:
617     This node is a document node.
618     @@@PerlDef:
619     $r = <ClassM::ManakaiDISNode.getNodeReference>
620     ($self->{<Q::TreeCore:node>}->{<Q::DOMCore:ownerDocument>})
621     if $self->{<Q::TreeCore:node>}->{<Q::DOMCore:ownerDocument>};
622 wakaba 1.1 ##DISNode
623    
624     ClsDef:
625     @ClsQName: ManakaiDISElement
626     @ClsISA:
627 wakaba 1.3 swcfg21:ManakaiSWCFGElement::swcfg21:ForLatest
628 wakaba 1.1 @ClsISA: ManakaiDISNode
629     @Description:
630     @@lang:en
631     @@@:
632     <QUOTE::dis> element node objects.
633    
634     @Method:
635     @@Name: forMatch
636     @@Description:
637     @@@lang:en
638     @@@@:
639     Tests whether this element is for a <QUOTE::for> or not.
640     @@Param:
641     @@@Name: forArg
642     @@@Type: ForURI
643     @@@Description:
644     @@@@lang:en
645     @@@@@:
646     The <QUOTE::For> URI reference to test against.
647     @@Param:
648     @@@Name: forpArg
649     @@@Type: ForURIList
650     @@@Description:
651     @@@@lang:en
652     @@@@@:
653     The <QUOTE::For+> URI references to test against.
654     @@@InCase:
655     @@@@Value:
656     @@@@@is-null:1
657     @@@@Description:
658     @@@@@lang:en
659     @@@@@@:
660     No additional <QUOTE::For> URI reference.
661 wakaba 1.3 Equivalent to an empty array reference.
662 wakaba 1.1 @@Return:
663     @@@Type:
664     DOMMain:boolean
665     @@@Description:
666     @@@@lang:en
667     @@@@@:
668     Whether this element is for <P::forArg> and <P::forpArg> or not.
669 wakaba 1.2 @@@UndeclaredPrefixException:
670     @@@NoDBException:
671     @@@PerlDef:
672 wakaba 1.3 $forArg = <Q::ManakaiDOM:all> unless defined $forArg;
673     $forpArg ||= [];
674 wakaba 1.2
675     FORMATCH: {
676     __DEEP{
677 wakaba 1.4 my @ce = @{$self-><M::ManakaiDISElement.disChildElements>};
678 wakaba 1.2 for my $ce (@ce) {
679 wakaba 1.3 my $et = $ce-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
680     .expandedURI>;
681 wakaba 1.2 if ($et eq <Q::dis:ForCheck>) {
682 wakaba 1.3 my $for = [split /\s+/, $ce-><AG::swcfg21:SWCFGNode
683     ::swcfg21:ForLatest.value>];
684 wakaba 1.2 FCs: for my $f (@$for) {
685     if ($f =~ /^!=(.+)$/) { ## -- NOT EQUAL TO
686     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
687     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
688     -><AG::ManakaiDISDocument.disDatabase>
689     -><M::ManakaiDISDatabase.getFor> ($uri);
690     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
691 wakaba 1.3 for my $arg_uri ($forArg, @{$forpArg}) {
692 wakaba 1.2 if ($uri eq $arg_uri) {
693     $r = false;
694     last FORMATCH;
695     }
696     }
697     } elsif ($f =~ /^!(.+)$/) { ## -- NOT ISA
698     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
699     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
700     -><AG::ManakaiDISDocument.disDatabase>
701     -><M::ManakaiDISDatabase.getFor> ($uri);
702     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
703 wakaba 1.3 for my $arg_uri ($forArg, @{$forpArg}) {
704 wakaba 1.2 if ($f-><M::ManakaiDISForDefinition.isaURI> ($arg_uri)) {
705     $r = false;
706     last FORMATCH;
707     }
708     }
709     } elsif ($f =~ /^=(.+)$/) { ## -- EQUAL TO
710     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
711     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
712     -><AG::ManakaiDISDocument.disDatabase>
713     -><M::ManakaiDISDatabase.getFor> ($uri);
714     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
715 wakaba 1.3 for my $arg_uri ($forArg, @{$forpArg}) {
716 wakaba 1.2 if ($arg_uri eq $uri) {
717     next FCs;
718     }
719     }
720     $r = false;
721     last FORMATCH;
722     } else { ## -- ISA
723     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
724     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
725     -><AG::ManakaiDISDocument.disDatabase>
726     -><M::ManakaiDISDatabase.getFor> ($uri);
727     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
728 wakaba 1.3 for my $arg_uri ($forArg, @{$forpArg}) {
729 wakaba 1.2 if ($f-><M::ManakaiDISForDefinition.isaURI> ($arg_uri)) {
730     next FCs;
731     }
732     }
733     $r = false;
734     last FORMATCH;
735     }
736     } # FCs
737     } # dis:ForCheck
738     } # children
739    
740     my $has_for = false;
741     for my $ce (@ce) {
742 wakaba 1.3 if ($self-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
743     .expandedURI> eq
744 wakaba 1.2 <Q::dis:For>) {
745 wakaba 1.3 my $for = [split /\s+/, $ce-><AG::swcfg21:SWCFGNode
746     ::swcfg21:ForLatest.value>];
747 wakaba 1.2 my $ok = true;
748     $has_for = true;
749     AFOR: for my $f (@$for) {
750     if ($f =~ /^!=(.+)$/) { ## -- NOT EQUAL TO
751     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
752     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
753     -><AG::ManakaiDISDocument.disDatabase>
754     -><M::ManakaiDISDatabase.getFor> ($uri);
755     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
756 wakaba 1.3 if ($uri eq $forArg) {
757 wakaba 1.2 $ok = false;
758     last AFOR;
759     }
760     } elsif ($f =~ /^!(.+)$/) { ## -- NOT ISA
761     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
762     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
763     -><AG::ManakaiDISDocument.disDatabase>
764     -><M::ManakaiDISDatabase.getFor> ($uri);
765     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
766 wakaba 1.3 if ($f-><M::ManakaiDISForDefinition.isaURI> ($forArg)) {
767 wakaba 1.2 $ok = false;
768     last AFOR;
769     }
770     } elsif ($f =~ /^=(.+)$/) { ## -- EQUAL TO
771     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
772     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
773     -><AG::ManakaiDISDocument.disDatabase>
774     -><M::ManakaiDISDatabase.getFor> ($uri);
775     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
776 wakaba 1.3 unless ($uri eq $forArg) {
777 wakaba 1.2 $ok = false;
778     last AFOR;
779     }
780     } else { ## -- ISA
781     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
782     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
783     -><AG::ManakaiDISDocument.disDatabase>
784     -><M::ManakaiDISDatabase.getFor> ($uri);
785     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
786 wakaba 1.3 unless ($f-><M::ManakaiDISForDefinition.isaURI> ($forArg)) {
787 wakaba 1.2 $ok = false;
788     last AFOR;
789     }
790     }
791     } # AFOR
792 wakaba 1.3 if ($ok) {
793     $r = true;
794     last FORMATCH;
795     }
796 wakaba 1.2 } # dis:For
797     } # $ce
798     $r = $has_for ? false : true;
799     }__;
800     } # FORMATCH
801 wakaba 1.1
802     @Method:
803     @@Name: mediaTypeMatch
804     @@Description:
805     @@@lang:en
806     @@@@:
807     Tests whether the content media type of this element matches to
808     a type or not.
809     @@Param:
810     @@@Name: mediaType
811     @@@Type: MediaTypeURI
812     @@@Description:
813     @@@@lang:en
814     @@@@@:
815     A media type URI reference to test against.
816     @@Param:
817 wakaba 1.3 @@@Name: defaultMediaType
818 wakaba 1.1 @@@Type: MediaTypeURI
819     @@@Description:
820     @@@@lang:en
821     @@@@@:
822     The default media type for this element.
823     @@@InCase:
824     @@@@Value:
825     @@@@@is-null:1
826     @@@@Description:
827     @@@@@lang:en
828     @@@@@@:
829     No default type provided. All <P::mediaType> will match.
830     @@Return:
831     @@@Type:
832     DOMMain:boolean
833     @@@Description:
834     @@@@lang:en
835     @@@@@:
836     Whether this element is of <P::mediaType> or not.
837 wakaba 1.2 @@@PerlDef:
838     if (defined $mediaType) {
839     __DEEP{
840     my $ctn = $self-><M::ManakaiDISElement.disGetAttribute>
841     (<Q::dis:ContentType>);
842     my $ct;
843     $ct = $ctn-><AG::ManakaiDISElement.qnameValueURI> if $ctn;
844     $ct = $defaultMediaType unless defined $ct;
845     my $res = $self-><AG::ManakaiDISNode.ownerDISDocument>
846     -><AG::ManakaiDISDocument.disDatabase>
847     -><M::ManakaiDISDatabase.getResource> ($ct);
848     $res-><AS::ManakaiDISResourceDefinition.isReferred> ($ctn or $self);
849     unless ($res-><M::ManakaiDISResourceDefinition.subsetOfURI> ($ct)) {
850     $r = false;
851     } else {
852     $r = true;
853     }
854     }__;
855     } else {
856     $r = true;
857     }
858 wakaba 1.1
859     @Method:
860     @@Name: prefixToURI
861     @@Description:
862     @@@lang:en
863     @@@@:
864     Converts a namespace prefix into associated URI reference.
865     @@Param:
866     @@@Name: prefix
867     @@@Type:
868 wakaba 1.3 DISCore:NamespacePrefix::ManakaiDOM:all
869 wakaba 1.1 @@@Description:
870     @@@@lang:en
871     @@@@@:
872     A namespace prefix to look for.
873     @@@InCase:
874     @@@@Value:
875     @@@@@is-null:1
876     @@@@Description:
877     @@@@@lang:en
878     @@@@@@:
879     Returns the default namespace URI.
880     @@NodeParam:
881     @@Return:
882 wakaba 1.3 @@@Type: AnyURI
883 wakaba 1.1 @@@Description:
884     @@@@lang:en
885     @@@@@: The URI references associated.
886     @@@UndeclaredPrefixException:
887     @@@PerlDef:
888 wakaba 1.3 if (defined $prefix) {
889 wakaba 1.1 __DEEP{
890 wakaba 1.3 $r = $self-><M::swcfg21:SWCFGNode::swcfg21:ForLatest
891     .lookupNamespaceURI> ($prefix);
892 wakaba 1.1 }__;
893     unless (defined $r) {
894     __EXCEPTION{UNDECLARED_NS_PREFIX_ERR::
895     infoset:prefix => {$prefix},
896     MDOMX:param-name => 'prefix',
897     DIS:sourceNode => {$node},
898     }__;
899     }
900     } else {
901     ## TODO: default namespace
902     }
903    
904     @Method:
905     @@QName: qnameToURI
906     @@Description:
907     @@@lang:en
908     @@@@:
909     Converts a qualified name (<TYPE::dis:TypeQName>) to
910     an expanded URI reference.
911     @@Param:
912     @@@Name: qname
913     @@@Type:
914     dis:TypeQName
915     @@@Description:
916     @@@@lang:en
917     @@@@@:
918     A qualified name.
919     @@NodeParam:
920     @@Return:
921     @@@Type: AnyURI
922     @@@Description:
923     @@@@lang:en
924     @@@@@:
925     The expanded URI reference.
926     @@@UndeclaredPrefixException:
927     @@@PerlDef:
928     $qname =~ s/^\s+//; $qname =~ s/\s+$//;
929     my ($prefix, $lname) = split /:/, $qname;
930     __DEEP{
931     if (defined $lname) {
932     $r = $self-><M::ManakaiDISElement.prefixToURI> ($prefix) . $lname;
933     } else { ## In default namespace
934     $r = $self-><M::ManakaiDISElement.prefixToURI> (null) . $prefix;
935     }
936 wakaba 1.4 }__;
937 wakaba 1.1
938     @Method:
939     @@QName: qnameToPair
940     @@Description:
941     @@@lang:en
942     @@@@:
943     Converts a qualified name (<TYPE::dis:TypeQName>) to
944     a pair of namespace URI and local name.
945     @@Param:
946     @@@Name: qname
947     @@@Type:
948     dis:TypeQName
949     @@@Description:
950     @@@@lang:en
951     @@@@@:
952     A qualified name.
953     @@NodeParam:
954     @@Return:
955     @@@Type:
956     Perl:ARRAY
957     @@@Description:
958     @@@@lang:en
959     @@@@@:
960     A list of namespace URI and local name.
961     @@@UndeclaredPrefixException:
962     @@@PerlDef:
963     $qname =~ s/^\s+//; $qname =~ s/\s+$//;
964     my ($prefix, $lname) = split /:/, $qname;
965     __DEEP{
966     if (defined $lname) {
967     $r = [$self-><M::ManakaiDISElement.prefixToURI> ($prefix), $lname];
968     } else { ## In default namespace
969     $r = [$self-><M::ManakaiDISElement.prefixToURI> (null), $prefix];
970     }
971 wakaba 1.4 }__;
972 wakaba 1.1
973     @Method:
974 wakaba 1.3 @@Name: tfqnamesToURI
975 wakaba 1.1 @@Description:
976     @@@lang:en
977     @@@@:
978 wakaba 1.3 Converts a <TYPE::dis:TFQNames>
979 wakaba 1.1 into an expanded URI reference.
980     @@Param:
981     @@@Name: tfqnames
982     @@@Type:
983 wakaba 1.3 dis:TFQNames
984 wakaba 1.1 @@@Description:
985     @@@@lang:en
986     @@@@@:
987 wakaba 1.3 A <TYPE::dis:TFQNames> to identify a resource.
988 wakaba 1.1 @@Param:
989     @@@Name: defaultTypeURI
990     @@@Type: NameURI
991     @@@Description:
992     @@@@lang:en
993     @@@@@:
994     A name URI reference used if it is missing from
995     <P::tfqnames>.
996     @@@InCase:
997     @@@@Value:
998     @@@@@is-null:1
999     @@@@Description:
1000     @@@@@lang:en
1001     @@@@@@:
1002     Equivalent to <Q::DOMMain:any>.
1003     @@Param:
1004     @@@Name: defaultForURI
1005     @@@Type: ForURI
1006     @@@Description:
1007     @@@@lang:en
1008     @@@@@:
1009     A <QUOTE::for> URI reference used if it is missing from
1010     <P::tfqnames>.
1011     @@@InCase:
1012     @@@@Value:
1013     @@@@@is-null:1
1014     @@@@Description:
1015     @@@@@lang:en
1016     @@@@@@:
1017     Equivalent to <QUOTE::for all>, i.e. <Q::ManakaiDOM:all>.
1018     @@NodeParam:
1019     @@Return:
1020     @@@Type:
1021 wakaba 1.3 DISCore:TFURI::ManakaiDOM:all
1022 wakaba 1.1 @@@Description:
1023     @@@@lang:en
1024     @@@@@:
1025 wakaba 1.3 The <TYPE::dis:TFQNames>-expanded URI references.
1026 wakaba 1.1 @@@UndeclaredPrefixException:
1027     @@@PerlDef:
1028     my ($typeq, $forq) = split /\s*::\s*/, $tfqnames, 2;
1029     my ($typeURI, $forURI);
1030     if (defined $forq) {
1031     __DEEP{
1032     $typeURI = $typeq eq ''
1033     ? defined $defaultTypeURI ? $defaultTypeURI
1034     : <Q::DOMMain:any>
1035     : $self-><M::ManakaiDISElement.qnameToURI> ($typeq, %opt);
1036     }__;
1037     if (length $forq) {
1038     $forURI = $self-><M::ManakaiDISElement.qnameToURI> ($forq, %opt);
1039     } else {
1040     $forURI = <Q::ManakaiDOM:all>;
1041     }
1042     } else { ## "For" omitted
1043     __DEEP{
1044     $typeURI = $typeq eq ''
1045     ? defined $defaultTypeURI ? $defaultTypeURI
1046     : <Q::DOMMain:any>
1047     : $self-><M::ManakaiDISElement.qnameToURI> ($typeq, %opt);
1048     }__;
1049 wakaba 1.3 $forURI = defined $defaultForURI ? $defaultForURI
1050     : <Q::ManakaiDOM:all>;
1051 wakaba 1.1 }
1052 wakaba 1.4 __CODE{tfurisToURI:: $turi => $typeURI, $furi => $forURI, $uri => $r}__;
1053 wakaba 1.2
1054     @Method:
1055     @@Name: disGetAttribute
1056     @@enDesc:
1057     Gets an attribute node.
1058     @@Param:
1059     @@@Name: attrName
1060     @@@Type: AnyURI
1061     @@@enDesc:
1062     The name expanded URI of the node to retrieve.
1063     @@ForParam:
1064     @@ForpParam:
1065     @@MediaTypeParam:
1066     @@MediaTypeDefaultParam:
1067     @@Return:
1068     @@@Type: ManakaiDISElement
1069     @@@enDesc:
1070     The attribute (property) element node.
1071     @@@nullCase:
1072     @@@@enDesc:
1073     No attribute node found.
1074     @@@PerlDef:
1075 wakaba 1.5 for my $c (@{$self-><M::ManakaiDISElement.disChildElements>}) {
1076 wakaba 1.3 if ($c-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
1077     .expandedURI> eq $attrName and
1078 wakaba 1.2 $c-><AG::ManakaiDISElement.forMatch> ($forArg, $forpArg) and
1079     $c-><AG::ManakaiDISElement.mediaTypeMatch>
1080 wakaba 1.3 ($mediaType, $defaultMediaType)) {
1081 wakaba 1.2 $r = $c;
1082     last;
1083     }
1084     }
1085    
1086     @Method:
1087     @@Name: disGetAttributeList
1088     @@enDesc:
1089     Gets attribute nodes.
1090 wakaba 1.3 @@Param:
1091     @@@Name: attrName
1092     @@@Type: AnyURI
1093     @@@enDesc:
1094     The name expanded URI of the node to retrieve.
1095 wakaba 1.2 @@ForParam:
1096     @@ForpParam:
1097     @@MediaTypeParam:
1098     @@MediaTypeDefaultParam:
1099     @@Return:
1100     @@@Type: ManakaiDISElementList
1101     @@@enDesc:
1102     The attribute (property) element nodes.
1103     @@@PerlDef:
1104     $r = bless [], <ClassName::ManakaiDISElementList>;
1105 wakaba 1.5 for my $c (@{$self-><M::ManakaiDISElement.disChildElements>}) {
1106 wakaba 1.3 if ($c-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
1107     .expandedURI> eq $attrName and
1108 wakaba 1.2 $c-><AG::ManakaiDISElement.forMatch> ($forArg, $forpArg) and
1109     $c-><AG::ManakaiDISElement.mediaTypeMatch>
1110 wakaba 1.3 ($mediaType, $defaultMediaType)) {
1111 wakaba 1.2 push @$r, $c;
1112     }
1113     }
1114    
1115 wakaba 1.4 @Method:
1116 wakaba 1.2 @@Name: disChildElements
1117     @@enDesc:
1118     A list of child elements.
1119 wakaba 1.4 @@ForParam:
1120     @@ForpParam:
1121     @@Return:
1122     @@@Type: ManakaiDISElementList
1123 wakaba 1.2 @@@enDesc:
1124     The current snapshot of child nodes.
1125     @@@PerlDef:
1126 wakaba 1.4 $r = bless [], <ClassName::ManakaiDISElementList>;
1127     __DEEP{
1128     for my $cn (@{$self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
1129     .childNodes>}) {
1130     ## $cn is an #element.
1131     my $dn = $cn->{<Q::TreeCore:node>}
1132     -><M::ManakaiDOM:ManakaiDOMNodeObject
1133     ::ManakaiDOM:Perl.newReference>
1134     (<ClassName::ManakaiDISElement>);
1135     next unless $dn-><M::ManakaiDISElement.forMatch> ($forArg, $forpArg);
1136     push @$r, $dn;
1137     }
1138     }__;
1139 wakaba 1.5
1140 wakaba 1.2 @Attr:
1141     @@Name: qnameValueURI
1142     @@enDesc:
1143     The element value (written as <TYPE::dis:TypeQName>), as URI reference.
1144     \
1145     {NOTE:: What should be if list value?
1146     \
1147     }
1148     @@Get:
1149     @@@Type:AnyURI
1150     @@@nullCase:
1151     @@@@enDesc:
1152     No value.
1153     @@@UndeclaredPrefixException:
1154 wakaba 1.3 @@@PerlDef:
1155 wakaba 1.4 __DEEP{
1156     my $v = $self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest.value>;
1157     if (defined $v and not ref $v eq 'ARRAY') {
1158     $r = $self-><AG::ManakaiDISElement.qnameToURI> ($v, node => $self);
1159     } else {
1160     $r = null;
1161     }
1162     }__;
1163    
1164     @Attr:
1165     @@Name: qnameValueLocalName
1166     @@enDesc:
1167     The local name part of the element value (assumed as
1168     written as <TYPE::dis:TypeQName>).
1169     \
1170     {NOTE:: What should be if list value?
1171     \
1172     }
1173     @@Get:
1174     @@@Type:
1175     DISCore:LocalName
1176     @@@nullCase:
1177     @@@@enDesc:
1178     No value.
1179     @@@PerlDef:
1180     __DEEP{
1181     my $v = $self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest.value>;
1182     if (defined $v and not ref $v eq 'ARRAY') {
1183     my ($n, $v) = split /:/, $v, 2;
1184     $r = defined $v ? $v : $n;
1185     } else {
1186     $r = null;
1187     }
1188     }__;
1189    
1190     @Attr:
1191     @@Name: qnameValueNamespaceURI
1192     @@enDesc:
1193     The namespace URI of the element value (assumed as written
1194     in <TYPE::dis:TypeQName>).
1195     \
1196     {NOTE:: What should be if list value?
1197     \
1198     }
1199     @@Get:
1200     @@@Type:AnyURI
1201     @@@nullCase:
1202     @@@@enDesc:
1203     No value.
1204     @@@UndeclaredPrefixException:
1205     @@@PerlDef:
1206     __DEEP{
1207     my $v = $self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest.value>;
1208     if (defined $v and not ref $v eq 'ARRAY') {
1209     my ($p, $v) = split /:/, $v, 2;
1210     $r = $self-><AG::ManakaiDISElement.prefixToURI>
1211     (defined $v ? $p : null);
1212     } else {
1213     $r = null;
1214     }
1215     }__;
1216 wakaba 1.2
1217     @Attr:
1218 wakaba 1.3 @@Name: tfqnamesValueURI
1219 wakaba 1.2 @@enDesc:
1220 wakaba 1.3 The element value (written as <TYPE::dis:TFQNames>),
1221 wakaba 1.2 as URI reference.
1222     \
1223     {NOTE:: What should be if list value?
1224     \
1225     }
1226     @@Get:
1227     @@@Type:ResourceURI
1228     @@@nullCase:
1229     @@@@enDesc:
1230     No value.
1231     @@@UndeclaredPrefixException:
1232 wakaba 1.3 @@@PerlDef:
1233     my $v = $self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest.value>;
1234 wakaba 1.2 if (defined $v and not ref $v eq 'ARRAY') {
1235     __DEEP{
1236 wakaba 1.3 $r = $self-><AG::ManakaiDISElement.tfqnamesToURI> ($v);
1237 wakaba 1.2 }__;
1238     } else {
1239     $r = null;
1240     }
1241 wakaba 1.1 ##DISElement
1242    
1243     ClsDef:
1244 wakaba 1.4 @ClsQName: ManakaiDISModuleElement
1245     @ClsISA: ManakaiDISElement
1246     @enDesc:
1247     The <Q::dis:Module> elements.
1248    
1249     @Attr:
1250     @@Name: requireElement
1251     @@enDesc:
1252     The <Q::dis:Require> child element. The element is
1253     newly created if not exist.
1254     @@Type: ManakaiDISElement
1255     @@Get:
1256     @@@PerlDef:
1257     __DEEP{
1258     $r = $self-><M::swcfg21:SWCFGNode
1259     ::swcfg21:ForLatest.getAttributeNS>
1260     (<Q::dis:>, 'Require', make_new_node => true);
1261     }__;
1262    
1263     @Attr:
1264     @@Name: defaultForURI
1265     @@enDesc:
1266     The value of <Q::dis:DefaultFor> attribute.
1267     @@Type: ForURI
1268     @@Get:
1269     @@@enDesc:
1270     The value of <Q::dis:DefaultFor> child element. If missing,
1271     <Q::ManakaiDOM:all> is returned.
1272     @@@PerlDef:
1273     __DEEP{
1274     my $df = $self-><M::swcfg21:SWCFGNode::swcfg21:ForLatest
1275     .getAttributeNS>
1276     (<Q::dis:>, 'DefaultFor');
1277     if ($df) {
1278     $r = $df-><AG::ManakaiDISElement.qnameValueURI>
1279     || <Q::ManakaiDOM:all>;
1280     } else {
1281     $r = <Q::ManakaiDOM:all>;
1282     }
1283     }__;
1284     @@Set:
1285     @@@PerlDef:
1286     __DEEP{
1287     $self-><M::swcfg21:SWCFGNode::swcfg21:ForLatest.setAttributeNS>
1288     (<Q::dis:>, 'DefaultFor' => $given);
1289     }__;
1290     ##DISModuleElement
1291    
1292     ClsDef:
1293 wakaba 1.2 @ClsQName: ManakaiDISElementList
1294     @enDesc:
1295     @@lang:en
1296     @@@:
1297     Lists of elements.
1298     \
1299     {NOTE:: <Class::ManakaiDISElementList> is <QUOTE::dead>;
1300     later changes to the tree does not affect this type of objects.
1301     \
1302     }
1303     ##DISElementList
1304    
1305     ClsDef:
1306 wakaba 1.1 @ClsQName: ManakaiDISComment
1307     @ClsISA:
1308 wakaba 1.3 swcfg21:ManakaiSWCFGComment::swcfg21:ForLatest
1309 wakaba 1.1 @ClsISA: ManakaiDISNode
1310     @Description:
1311     @@lang:en
1312     @@@:
1313     <QUOTE::dis> comment node objects.
1314     ##DISComment
1315    
1316     ClsDef:
1317     @ClsQName: ManakaiDISDocumentFragment
1318     @ClsISA:
1319 wakaba 1.3 swcfg21:ManakaiSWCFGDocumentFragment::swcfg21:ForLatest
1320 wakaba 1.1 @ClsISA: ManakaiDISNode
1321     @Description:
1322     @@lang:en
1323     @@@:
1324     <QUOTE::dis> document fragment node objects.
1325     ##DISDocumentFragment
1326    
1327     ClsDef:
1328     @ClsQName: ManakaiDISDocument
1329     @ClsISA:
1330 wakaba 1.3 swcfg21:ManakaiSWCFGDocument::swcfg21:ForLatest
1331 wakaba 1.1 @ClsISA: ManakaiDISNode
1332     @Description:
1333     @@lang:en
1334     @@@:
1335     <QUOTE::dis> document node objects.
1336 wakaba 1.2
1337     @Attr:
1338 wakaba 1.4 @@Name: moduleElement
1339     @@enDesc:
1340     The <Q::dis:Module> element in this document. The element is
1341     newly created if not exist.
1342     @@Type: ManakaiDISModuleElement
1343     @@Get:
1344     @@@PerlDef:
1345     __DEEP{
1346     $r = $self-><M::swcfg21:SWCFGNode
1347     ::swcfg21:ForLatest.getAttributeNS>
1348     (<Q::dis:>, 'Module', make_new_node => true);
1349     }__;
1350     $r = bless $r, <ClassName::ManakaiDISModuleElement>;
1351    
1352     @Attr:
1353 wakaba 1.2 @@Name: disDatabase
1354     @@enDesc:
1355     Associated <QUOTE::dis> database.
1356    
1357     @@Type: ManakaiDISDatabase
1358     @@Get:
1359     @@@NoDBException:
1360     @@@PerlDef:
1361     if ($self->{<Q::TreeCore:node>}->{<Q::db>}) {
1362 wakaba 1.5 $r = $self->{<Q::TreeCore:node>}->{<Q::db>};
1363 wakaba 1.2 } else {
1364     __EXCEPTION{NO_ASSOCIATED_DB_ERR}__;
1365     }
1366     @@Set:
1367     @@@PerlDef:
1368     $self->{<Q::TreeCore:node>}->{<Q::db>} = $given;
1369     require Scalar::Util;
1370     Scalar::Util::weaken ($self->{<Q::TreeCore:node>}->{<Q::db>});
1371 wakaba 1.5
1372     @Method:
1373     @@Name: disChildElements
1374     @@enDesc:
1375     A list of child elements.
1376     @@ForParam:
1377     @@ForpParam:
1378     @@Return:
1379     @@@Type: ManakaiDISElementList
1380     @@@enDesc:
1381     The current snapshot of child nodes.
1382     @@@PerlDef:
1383     $r = bless [], <ClassName::ManakaiDISElementList>;
1384     __DEEP{
1385     for my $cn (@{$self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
1386     .childNodes>}) {
1387     next unless $cn-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
1388     .nodeType> eq '#element';
1389     my $dn = $cn->{<Q::TreeCore:node>}
1390     -><M::ManakaiDOM:ManakaiDOMNodeObject
1391     ::ManakaiDOM:Perl.newReference>
1392     (<ClassName::ManakaiDISElement>);
1393     next unless $dn-><M::ManakaiDISElement.forMatch> ($forArg, $forpArg);
1394     push @$r, $dn;
1395     }
1396     }__;
1397 wakaba 1.1 ##DISDocument
1398 wakaba 1.2
1399     PropDef:
1400     @QName: db
1401     @enDesc:
1402     Associated <QUOTE::dis> database.
1403     @rdfs:domain: ManakaiDISDocument
1404     @rdfs:range: ManakaiDISDatabase
1405    
1406     ## -- Definition object database
1407    
1408     ClsDef:
1409     @ClsQName: ManakaiDISDatabase
1410     @enDesc:
1411     Resource database created from <QUOTE::dis> source data.
1412 wakaba 1.4 @ClsISA: ManakaiDISExceptionTarget
1413 wakaba 1.2
1414     @Method:
1415     @@Name: getModule
1416     @@Description:
1417     @@@lang:en
1418     @@@@:
1419     Returns a <QUOTE::dis> module definition.
1420     @@Param:
1421     @@@Name: modURI
1422     @@@Type: ModuleURI
1423     @@@Description:
1424     @@@@lang:en
1425     @@@@@:
1426     A <QUOTE::dis> module URI reference.
1427     @@Return:
1428     @@@Type: ManakaiDISModuleDefinition
1429     @@@Description:
1430     @@@@lang:en
1431     @@@@@:
1432     The module definition.
1433     @@@PerlDef:
1434     if (defined $self->{modDef}->{$modURI}) {
1435     $r = $self->{modDef}->{$modURI};
1436     } else {
1437     $r = $self->{modDef}->{$modURI}
1438     = bless {
1439     uri => $modURI,
1440     db => $self,
1441     for => <Q::ManakaiDOM:all>,
1442     forp => [],
1443     }, <ClassName::ManakaiDISModuleDefinition>;
1444     require Scalar::Util;
1445     Scalar::Util::weaken ($r->{db});
1446     }
1447    
1448     @Method:
1449     @@Name: getFor
1450     @@Description:
1451     @@@lang:en
1452     @@@@:
1453     Returns a <QUOTE::for> definition object.
1454     @@Param:
1455     @@@Name: forURI
1456     @@@Type: ForURI
1457     @@@Description:
1458     @@@@lang:en
1459     @@@@@:
1460     A <QUOTE::for> URI reference.
1461     @@@InCase:
1462     @@@@Value:
1463     @@@@@is-null:1
1464     @@@@Description:
1465     @@@@@lang:en
1466     @@@@@@:
1467     Defaulted to <Q::ManakaiDOM:all>.
1468     @@Return:
1469     @@@Type: ManakaiDISForDefinition
1470     @@@PerlDef:
1471     $forURI = <Q::ManakaiDOM:all> unless defined $forURI;
1472     if (defined $self->{forDef}->{$forURI}) {
1473     $r = $self->{forDef}->{$forURI};
1474     } else {
1475     $r = $self->{forDef}->{$forURI}
1476     = bless {
1477     uri => $forURI,
1478     isa => {<Q::ManakaiDOM:all> => true},
1479     revISA => {},
1480     db => $self,
1481     }, <ClassName::ManakaiDISForDefinition>;
1482     $self->{forDef}->{<Q::ManakaiDOM:all>}->{revISA}->{$forURI} = true;
1483     require Scalar::Util;
1484     Scalar::Util::weaken ($r->{db});
1485     }
1486    
1487     @Method:
1488     @@Name: getResource
1489     @@Description:
1490     @@@lang:en
1491     @@@@:
1492     Returns a <QUOTE::dis> resource definition.
1493     @@Param:
1494     @@@Name: resURI
1495     @@@Type: ResourceURI
1496     @@@Description:
1497     @@@@lang:en
1498     @@@@@:
1499     A <QUOTE::dis> resource URI reference.
1500 wakaba 1.3 @@@nullCase:
1501 wakaba 1.2 @@@@Description:
1502     @@@@@lang:en
1503     @@@@@@:
1504     Defaulted to <Q::DOMMain:any>.
1505     @@Return:
1506     @@@Type: ManakaiDISResourceDefinition
1507     @@@Description:
1508     @@@@lang:en
1509     @@@@@:
1510     The resource definition.
1511     @@@PerlDef:
1512     $resURI = <Q::DOMMain:any> unless defined $resURI;
1513     if (defined $self->{resDef}->{$resURI}) {
1514     $r = $self->{resDef}->{$resURI};
1515     } else {
1516     $r = $self->{resDef}->{$resURI}
1517     = bless {
1518     uri => $resURI,
1519     subOf => {},
1520     supOf => {},
1521     db => $self,
1522     for => <Q::ManakaiDOM:all>,
1523     forp => [],
1524     }, <ClassName::ManakaiDISResourceDefinition>;
1525     require Scalar::Util;
1526     Scalar::Util::weaken ($r->{db});
1527     }
1528 wakaba 1.3
1529     @Method:
1530     @@Name: getSourceFile
1531     @@enDesc:
1532     Gets <QUOTE::dis> source document.
1533     @@Param:
1534     @@@Name: fileName
1535     @@@Type: FileURI
1536     @@@enDesc:
1537     A URI reference identifying a file.
1538     @@Return:
1539     @@@Type: ManakaiDISDocument
1540     @@@enDesc:
1541     The <QUOTE::dis> source document.
1542     @@@nullCase:
1543     @@@@enDesc:
1544     No document associated with that <P::fileName>.
1545     @@@PerlDef:
1546     $r = $self->{<Q::sourceFile>}->{$fileName};
1547     @Method:
1548     @@Name: setSourceFile
1549     @@enDesc:
1550     Puts <QUOTE::dis> source document object.
1551     @@Param:
1552     @@@Name: fileName
1553     @@@Type: FileURI
1554     @@@enDesc:
1555 wakaba 1.4 A URI reference identifying a file. If there is already a
1556 wakaba 1.3 source document, then the association has been updated.
1557     @@Param:
1558     @@@Name: doc
1559     @@@Type: ManakaiDISDocument
1560     @@@enDesc:
1561     The document object to set.
1562     @@Return:
1563     @@@PerlDef:
1564     $self->{<Q::sourceFile>}->{$fileName} = $doc;
1565 wakaba 1.4
1566     @Method:
1567     @@Name: loadModule
1568     @@enDesc:
1569     Loads definitions from a <QUOTE::dis> document.
1570     @@Param:
1571     @@@Name: doc
1572     @@@Type:ManakaiDISDocument
1573     @@@enDesc:
1574     The source <QUOTE::dis> document object. Its
1575     <A::ManakaiDISDocument.disDatabase> must be this database.
1576     @@Param:
1577     @@@Name: resolver
1578     @@@Type: DISModuleResolver
1579     @@@enDesc:
1580     The resolver to convert module name into <QUOTE::dis> document object.
1581     @@ForParam:
1582     @@Return:
1583     @@@RaiseException:
1584     @@@@@: NO_MODULE_QNAME_ERR
1585     @@@@enDesc:
1586     The <Q::dis:Module> element must have a <Q::dis:QName> attribute.
1587     @@@RaiseException:
1588     @@@@@: UNABLE_TO_GET_MODULE_ERR
1589     @@@@enDesc:
1590     The implementation is unable to get a module source.
1591 wakaba 1.5 @@@ForDefDupException:
1592     @@@ForDefNoQNameException:
1593     @@@ResDefDupException:
1594     @@@ElementNotAllowedException:
1595 wakaba 1.4 @@@PerlDef:
1596     $resolver = bless $resolver, <ClassName::ManakaiDISModuleResolver>
1597     if ref $resolver eq 'CODE';
1598     ## -- Module Name, URI
1599     $forArg = <Q::ManakaiDOM:all> unless defined $forArg;
1600     my $mod_node;
1601     my $mod_name_node;
1602     __DEEP{
1603     $mod_node = $doc-><AG::ManakaiDISDocument.moduleElement>;
1604     $mod_name_node = $mod_node-><M::swcfg21:SWCFGNode
1605     ::swcfg21:ForLatest.getAttributeNS>
1606     (<Q::dis:>, 'QName');
1607     unless ($mod_name_node) {
1608     __UNDEEP{
1609     __EXCEPTION{NO_MODULE_QNAME_ERR::
1610     DIS:sourceNode => {$mod_node},
1611     }__;
1612     }__;
1613     }
1614     my $mod_uri;
1615 wakaba 1.5 my $mod_name_uri = $mod_name_node
1616     -><AG::ManakaiDISElement.qnameValueURI>;
1617 wakaba 1.4 __CODE{tfurisToURI:: $turi => $mod_name_uri, $furi => $forArg,
1618     $uri => $mod_uri}__;
1619 wakaba 1.5 my $mod = $self-><M::ManakaiDISDatabase.getModule> ($mod_uri);
1620 wakaba 1.4
1621     unless ($mod-><M::ManakaiDISModuleDefinition.isDefined>) {
1622     ## -- Initializes Module Definition Object
1623     $mod->{nameURI} = $mod_name_uri;
1624     $mod->{localName} = $mod_name_node-><AG::ManakaiDISElement
1625     .qnameValueLocalName>;
1626     $mod->{namespaceURI} = $mod_name_node-><AG::ManakaiDISElement
1627     .qnameValueNamespaceURI>;
1628     $mod->{for} = $forArg;
1629     $mod->{src} = $mod_node;
1630 wakaba 1.5 $mod->{<Q::isDefined>} = true;
1631 wakaba 1.4 $self-><M::ManakaiDISDatabase.setSourceFile>
1632 wakaba 1.5 ($mod->{nameURI} => $doc);
1633    
1634    
1635     ## -- Loads "for all"
1636     my $nuri = $mod->{nameURI};
1637     my $forall = <Q::ManakaiDOM:all>;
1638     my $uri;
1639     __CODE{tfurisToURI:: $turi => $nuri, $furi => $forall,
1640     $uri => $uri}__;
1641     my $rmod = $self-><M::ManakaiDISDatabase.getModule> ($uri);
1642     unless ($rmod-><AG::ManakaiDISModuleDefinition.isDefined>) {
1643     my $rdoc = $resolver-><M::ManakaiDISModuleResolver.uriToDocument>
1644     ($self, $uri, $mod->{namespaceURI},
1645     $mod->{localName}, $forall);
1646     unless ($rdoc) {
1647     __UNDEEP{
1648     __EXCEPTION{UNABLE_TO_GET_MODULE_ERR::
1649     DIS:uri => {$uri},
1650     DIS:namespaceURI => {$mod->{namespaceURI}},
1651     DIS:localName => {$mod->{localName}},
1652     DIS:for => {$forall},
1653     DIS:sourceNode => {$mod->{src}},
1654     }__;
1655     }__;
1656     }
1657     $self-><M::ManakaiDISDatabase.loadModule>
1658     ($rdoc, $resolver, for_arg => $forall);
1659     } # Unless "for all" loaded
1660 wakaba 1.4
1661     ## -- Loads Required Modules
1662     my $req_node = $mod_node-><AG::ManakaiDISModuleElement
1663     .requireElement>;
1664     for my $rm (@{$req_node-><M::ManakaiDISElement.disChildElements>}) {
1665     next unless $rm-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
1666     .expandedURI> eq <Q::dis:Module>;
1667     my ($uri, $nuri, $ln, $for);
1668     my $mqn = $rm-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
1669     .getAttributeNS> (<Q::dis:>, 'QName');
1670     if ($mqn) {
1671     my $mqv = $mqn-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
1672     .value>;
1673     my $mqp = $mqn-><AG::ManakaiDISElement.qnameToPair>
1674     ($mqv, node => $mqn);
1675     ($nuri, $ln) = @$mqp;
1676     } else {
1677     my $mn = $rm-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
1678     .getAttributeNS> (<Q::dis:>, 'Name');
1679     if ($mn) {
1680     $nuri = $mod->{namespaceURI};
1681     $ln = $mn-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest.value>;
1682     } else {
1683     $nuri = $mod->{namespaceURI};
1684     $ln = $mod->{localName};
1685     }
1686     }
1687     my $wfn = $rm-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
1688     .getAttributeNS> (<Q::dis:>, 'WithFor');
1689     if ($wfn) {
1690     $for = $wfn-><AG::ManakaiDISElement.qnameValueURI>;
1691     } else {
1692     $for = $mod->{for};
1693     }
1694     my $xuri = $nuri . $ln;
1695     __CODE{tfurisToURI:: $turi => $xuri, $furi => $for,
1696     $uri => $uri}__;
1697     my $rmod = $self-><M::ManakaiDISDatabase.getModule> ($uri);
1698     unless ($rmod-><AG::ManakaiDISModuleDefinition.isDefined>) {
1699     my $rdoc = $resolver-><M::ManakaiDISModuleResolver.uriToDocument>
1700     ($self, $uri, $nuri, $ln, $for);
1701     unless ($rdoc) {
1702     __UNDEEP{
1703     __EXCEPTION{UNABLE_TO_GET_MODULE_ERR::
1704     DIS:uri => {$uri},
1705     DIS:namespaceURI => {$nuri},
1706     DIS:localName => {$ln},
1707     DIS:for => {$for},
1708     DIS:sourceNode => {$rm},
1709     }__;
1710     }__;
1711     }
1712     $self-><M::ManakaiDISDatabase.loadModule>
1713     ($rdoc, $resolver, for_arg => $for);
1714     }
1715     } # Child Module elements
1716    
1717 wakaba 1.5 my $root_elements = $doc-><M::ManakaiDISDocument.disChildElements>;
1718     if ($mod->{for} eq <Q::ManakaiDOM:all>) {
1719     ## -- Loads "for" definitions
1720     for my $el (@$root_elements) {
1721     next unless $el-><M::swcfg21:SWCFGElement::swcfg21:ForLatest
1722     .expandedURI> eq <Q::dis:ForDef>;
1723     $self-><M::ManakaiDISDatabase.loadFor> ($mod, $el);
1724     }
1725     }
1726    
1727     for my $el (@$root_elements) {
1728     my $et = $el-><M::swcfg21:SWCFGElement::swcfg21:ForLatest
1729     .expandedURI>;
1730     if ($et eq <Q::dis:ResourceDef>) {
1731     $self-><M::ManakaiDISDatabase.loadResource> ($mod, null, $el);
1732     } elsif ({
1733     <Q::dis:ForDef> => 1,
1734     <Q::dis:Module> => 1,
1735     <Q::dis:ImplNote> => 1,
1736     }->{$et}) {
1737     #
1738     } else {
1739     __UNDEEP{
1740     __EXCEPTION{ELEMENT_NOT_ALLOWED_ERR::
1741     DIS:elementType => {$et},
1742     DIS:sourceNode => {$el},
1743     DIS:uri => {$mod->{uri}},
1744     }__;
1745     }__;
1746     }
1747     }
1748     } # Unless this module loaded
1749     }__; # Deep
1750    
1751     @Method:
1752     @@Name: loadFor
1753     @@enDesc:
1754     Loads definition of a <QUOTE::for> from a <Q::dis:ForDef> element.
1755     @@Param:
1756     @@@Name: mod
1757     @@@Type: ManakaiDISModuleDefinition
1758     @@@enDesc:
1759     The module in which the <QUOTE::for> to load is defined.
1760     @@Param:
1761     @@@Name: el
1762     @@@Type:ManakaiDISElement
1763     @@@enDesc:
1764     The source <QUOTE::dis> <Q::dis:ForDef> element object.
1765     @@Return:
1766     @@@ForDefDupException:
1767     @@@ForDefNoQNameException:
1768     @@@ElementNotAllowedException:
1769     @@@PerlDef:
1770     __DEEP{
1771     my $qn_node = $el-><M::swcfg21:SWCFGNode
1772     ::swcfg21:ForLatest.getAttributeNS>
1773     (<Q::dis:>, 'QName');
1774     unless ($qn_node) {
1775     __UNDEEP{
1776     __EXCEPTION{NO_FOR_QNAME_ERR::
1777     DIS:sourceNode => {$qn_node},
1778     }__;
1779     }__;
1780     }
1781     my $qn_uri = $qn_node-><AG::ManakaiDISElement.qnameValueURI>;
1782     my $for = $self-><M::ManakaiDISDatabase.getFor> ($qn_uri);
1783    
1784     unless ($for-><M::ManakaiDISForDefinition.isDefined>) {
1785     ## -- Initializes For Definition Object
1786     $for->{src} = $el;
1787     $for->{<Q::isDefined>} = true;
1788     $for->{<Q::definingModule>} = $mod->{uri};
1789    
1790     for my $ce (@{$el-><M::ManakaiDISElement.disChildElements>}) {
1791     my $xn = $ce-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
1792     .expandedURI>;
1793     if ($xn eq <Q::dis:ISA> or $xn eq <Q::dis:Implement>) {
1794     my $sfor = $self-><M::ManakaiDISDatabase.getFor>
1795     ($ce-><M::ManakaiDISElement.qnameValueURI>);
1796     $for-><M::ManakaiDISForDefinition.addISA> ($sfor);
1797     ## TODO: warn if dis:Implement
1798     } elsif ({
1799     <Q::dis:Description> => 1,
1800     <Q::dis:ImplNote> => 1,
1801     <Q::dis:FullName> => 1,
1802     <Q::dis:QName> => 1,
1803     }->{$xn}) {
1804     #
1805     } else {
1806     __UNDEEP{
1807     __EXCEPTION{ELEMENT_NOT_ALLOWED_ERR::
1808     DIS:elementType => {$xn},
1809     DIS:sourceNode => {$ce},
1810     DIS:uri => {$mod->{uri}},
1811     }__;
1812     }__;
1813     }
1814     }
1815     } else {
1816     __UNDEEP{
1817     __EXCEPTION{FOR_ALREADY_DEFINED_ERR::
1818     DIS:sourceNode => {$el},
1819     DIS:anotherSourceNode => {$for->{src}},
1820     }__;
1821     }__;
1822     } # isDefine?
1823     }__; # DEEP
1824    
1825     @Method:
1826     @@Name: loadResource
1827     @@enDesc:
1828     Loads definition of a <QUOTE::dis> resource from a
1829     <Q::dis:ResourceDef> element.
1830     @@Param:
1831     @@@Name: mod
1832     @@@Type: ManakaiDISModuleDefinition
1833     @@@enDesc:
1834     The module in which the resource to load is defined.
1835     @@Param:
1836     @@@Name: parentResource
1837     @@@Type: ManakaiDISResourceDefinition
1838     @@@enDesc:
1839     The parent resource in which the resource to load is defined.
1840     @@@nullCase:
1841     @@@@enDesc:
1842     The resource to load is a root resource, i.e. <P::el> is
1843     a direct child of the document node.
1844     @@Param:
1845     @@@Name: el
1846     @@@Type:ManakaiDISElement
1847     @@@enDesc:
1848     The source <QUOTE::dis> <Q::dis:ResourceDef> element object.
1849     @@ForParam:
1850     @@ForpParam:
1851     @@Return:
1852     @@@ResDefDupException:
1853     @@@ElementNotAllowedException:
1854     @@@PerlDef:
1855     $forArg = <Q::ManakaiDOM:all> unless defined $forArg;
1856     $forpArg ||= [];
1857     __DEEP{
1858     my $qn_node = $el-><M::ManakaiDISElement.disGetAttribute>
1859     (<Q::dis:QName>, for_arg => $forArg,
1860     forp_arg => $forpArg);
1861     my $res;
1862     if ($qn_node) {
1863     my $qn_uri = $qn_node-><AG::ManakaiDISElement.qnameValueURI>;
1864 wakaba 1.4 my $uri;
1865 wakaba 1.5 __CODE{tfurisToURI:: $turi => $qn_uri, $furi => $forArg,
1866 wakaba 1.4 $uri => $uri}__;
1867 wakaba 1.5 $res = $self-><M::ManakaiDISDatabase.getResource> ($uri);
1868     if ($res-><M::ManakaiDISForDefinition.isDefined>) {
1869     __UNDEEP{
1870     __EXCEPTION{RESOURCE_ALREADY_DEFINED_ERR::
1871     DIS:uri => {$uri},
1872     DIS:sourceNode => {$qn_node},
1873     DIS:anotherSourceNode => {$res->{src}},
1874     }__;
1875     }__;
1876     }
1877     $res->{nameURI} = $qn_uri;
1878     $res->{localName} = $qn_node-><AG::ManakaiDISElement
1879     .qnameValueLocalName>;
1880     $res->{namespaceURI} = $qn_node-><AG::ManakaiDISElement
1881     .qnameValueNamespaceURI>;
1882     } else { ## Anonymous or local
1883     my $n_node = $el-><M::ManakaiDISElement.disGetAttribute>
1884     (<Q::dis:Name>, for_arg => $forArg,
1885     forp_arg => $forpArg);
1886     if ($n_node) {
1887     $res->{localName} = $n_node-><AG::swcfg21:SWCFGNode
1888     ::swcfg21:ForLatest.value>;
1889     if ($parentResource) {
1890     my $puri = $parentResource->{uri};
1891     my $ru;
1892     my $ln = $res->{localName};
1893     __CODE{getChildResourceURI:: $parentURI => $puri,
1894     $localName => $ln,
1895     $result => $ru}__;
1896     my $uri;
1897     __CODE{tfurisToURI:: $turi => $ru, $furi => $forArg,
1898     $uri => $uri}__;
1899     $res = $self-><M::ManakaiDISDatabase.getResource> ($uri);
1900     $res->{nameURI} = $ru;
1901     $res->{<Q::isAnon>} = true;
1902     } else { ## Root local name resource
1903     $res->{namespaceURI}
1904     = $mod-><M::ManakaiDISPropertyAccessor.getPropertyText>
1905     (<Q::dis:Namespace>, null);
1906     $res->{nameURI} = $res->{namespaceURI} . $res->{localName};
1907     }
1908     } else {
1909     $res = $self-><M::ManakaiDISDatabase.getResource>
1910     (<Code::ManakaiDOM:generateUniqueID
1911     ||ManakaiDOM:all>);
1912     $res->{<Q::isAnon>} = true;
1913     }
1914    
1915     }
1916     $res->{for} = $forArg;
1917     $res->{forp} = $forpArg;
1918     $res->{src} = $el;
1919     $res->{<Q::definingModule>} = $mod->{uri};
1920     $res->{<Q::dis2pm:parentResource>} = $parentResource->{uri}
1921     if $parentResource;
1922    
1923     =pod
1924    
1925     for my $ce (@{$el-><M::ManakaiDISElement.disChildElements>}) {
1926     my $xn = $ce-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
1927     .expandedURI>;
1928     if ($xn eq <Q::dis:ISA> or $xn eq <Q::dis:Implement>) {
1929     my $sfor = $self-><M::ManakaiDISDatabase.getFor>
1930     ($ce-><M::ManakaiDISElement.qnameValueURI>);
1931     $for-><M::ManakaiDISForDefinition.addISA> ($sfor);
1932     ## TODO: warn if dis:Implement
1933     } elsif ({
1934     <Q::dis:Description> => 1,
1935     <Q::dis:ImplNote> => 1,
1936     <Q::dis:FullName> => 1,
1937     <Q::dis:QName> => 1,
1938     }->{$xn}) {
1939     #
1940     } else {
1941 wakaba 1.4 __UNDEEP{
1942 wakaba 1.5 __EXCEPTION{ELEMENT_NOT_ALLOWED_ERR::
1943     DIS:uri => {$mod->{uri}},
1944     DIS:sourceNode => {$ce},
1945     DIS:elementType => {$xn},
1946 wakaba 1.4 }__;
1947     }__;
1948     }
1949     }
1950 wakaba 1.5
1951     =cut
1952    
1953     }__; # DEEP
1954    
1955 wakaba 1.2 ##DISDatabase
1956    
1957 wakaba 1.5 ElementTypeBinding:
1958     @Name: ForDefDupException
1959     @ElementType:
1960     ManakaiDOM:raises
1961     @ShadowContent:
1962     @@@: FOR_ALREADY_DEFINED_ERR
1963     @@Description:
1964     @@@lang:en
1965     @@@@:
1966     The <QUOTE::for> is already defined elsewhere.
1967    
1968     ElementTypeBinding:
1969     @Name: ForDefNoQNameException
1970     @ElementType:
1971     ManakaiDOM:raises
1972     @ShadowContent:
1973     @@@: NO_FOR_QNAME_ERR
1974     @@Description:
1975     @@@lang:en
1976     @@@@:
1977     A <Q::dis:ForDef> element must have a <Q::dis:QName> attribute.
1978    
1979     ElementTypeBinding:
1980     @Name: ResDefDupException
1981     @ElementType:
1982     ManakaiDOM:raises
1983     @ShadowContent:
1984     @@@: RESOURCE_ALREADY_DEFINED_ERR
1985     @@Description:
1986     @@@lang:en
1987     @@@@:
1988     The <QUOTE::dis> resource is already defined elsewhere.
1989    
1990     ElementTypeBinding:
1991     @Name: ElementNotAllowedException
1992     @ElementType:
1993     ManakaiDOM:raises
1994     @ShadowContent:
1995     @@@: ELEMENT_NOT_ALLOWED_ERR
1996     @@Description:
1997     @@@lang:en
1998     @@@@:
1999     An element has found where it is not allowed.
2000    
2001 wakaba 1.4 IFClsDef:
2002     @QName:
2003     @@@: DISModuleResolver
2004     @@ForCheck: ForIF
2005     @QName:
2006     @@@: ManakaiDISModuleResolver
2007     @@ForCheck: ForClass
2008     @enDesc:
2009     Objects implementing <IF::DISModuleResolver> interface
2010     are used to convert module name into <QUOTE::dis> document object.
2011     \
2012     {NOTE:: It is also acceptable to pass a <Perl::CODE> reference
2013     as a method parameter where <IF::DISModuleResolver> is
2014     expected.
2015     \
2016     }
2017     @Method:
2018     @@Name: uriToDocument
2019     @@enDesc:
2020     Returns a <QUOTE::dis> document from module name information.
2021     @@Param:
2022     @@@Name: disDB
2023     @@@Type: ManakaiDISDatabase
2024     @@@enDesc:
2025     The <QUOTE::dis> database.
2026     @@Param:
2027     @@@Name: moduleURI
2028     @@@Type: ModuleURI
2029     @@@enDesc:
2030     The URI reference of the module.
2031     \
2032     {NOTE:: This parameter is redundant, since it can be
2033     composed from other three parameters.
2034     \
2035     }
2036     @@Param:
2037     @@@Name: moduleNamespaceURI
2038     @@@Type: AnyURI
2039     @@@enDesc:
2040     The namespace URI of the module name.
2041     @@Param:
2042     @@@Name: moduleLocalName
2043     @@@Type:
2044     DISCore:LocalName
2045     @@@enDesc:
2046     The local name of the module name.
2047     @@Param:
2048     @@@Name: moduleFor
2049     @@@Type: ForURI
2050     @@@enDesc:
2051     The <QUOTE::for> URI reference for which the module is defined.
2052     @@Return:
2053     @@@Type: ManakaiDISDocument
2054     @@@enDesc:
2055     The <QUOTE::dis> document. It don't have to be a newly created
2056     object.
2057     @@@nullCase:
2058     @@@@enDesc:
2059     The method is unable to resolve the reference.
2060     @@@PerlDef:
2061     $r = $self->(@_);
2062     @ManakaiDOM:inputNormalizer:
2063     @@ContentType:
2064     lang:Perl
2065     @@@:
2066     $INPUT = bless $INPUT, <ClassName::ManakaiDISModuleResolver>
2067     if ref $INPUT eq 'CODE';
2068     @@ImplNote:
2069     @@@lang:en
2070     @@@@:
2071     <FILE::cdis2pm.pl> does not support non-datatype input normalizers yet.
2072     ##DISModuleResolver
2073    
2074 wakaba 1.3 PropDef:
2075     @QName: sourceFile
2076     @enDesc:
2077     Source <QUOTE::dis> documents.
2078     @rdfs:domain: ManakaiDISDatabase
2079     @rdfs:range: ManakaiDISDocument
2080    
2081 wakaba 1.2 ClsDef:
2082     @ClsQName: ManakaiDISModuleDefinition
2083     @enDesc:
2084     <QUOTE::dis> module definitions.
2085     @ClsISA: ManakaiDISPropertyAccessor
2086 wakaba 1.4 @ClsISA: ManakaiDISExceptionTarget
2087 wakaba 1.2
2088     @Attr:
2089     @@Name: uri
2090     @@Type: ModuleURI
2091     @@Description:
2092     @@@lang:en
2093     @@@@:
2094     The URI reference of this <QUOTE::dis> module.
2095     @@Get:
2096     @@@PerlDef:
2097     $r = $self->{uri};
2098    
2099     @Attr:
2100     @@Name: nameURI
2101     @@Type: NameURI
2102     @@enDesc:
2103     The URI reference of this module, without
2104     <QUOTE::for> identifier.
2105     @@Get:
2106 wakaba 1.3 @@@PerlDef:
2107 wakaba 1.4 $r = $self->{nameURI};
2108 wakaba 1.2
2109     @Attr:
2110     @@Name: localName
2111     @@enDesc:
2112     The local name of this module.
2113     @@Type:
2114 wakaba 1.3 DISCore:LocalName::ManakaiDOM:all
2115 wakaba 1.2 @@Get:
2116     @@@PerlDef:
2117     $r = $self->{localName};
2118    
2119     @Attr:
2120     @@Name: namespaceURI
2121     @@Type: AnyURI
2122     @@enDesc:
2123     The namespace URI of the name of this resource.
2124     @@Get:
2125     @@@PerlDef:
2126     $r = $self->{namespaceURI};
2127    
2128     @Attr:
2129     @@Name: forURI
2130     @@Type: ForURI
2131     @@enDesc:
2132     The <QUOTE::for> URI reference for which this module is defined.
2133     @@Get:
2134     @@@PerlDef:
2135     $r = $self->{for};
2136    
2137     @Attr:
2138     @@Name: isDefined
2139     @@Description:
2140     @@@lang:en
2141     @@@@:
2142     Whether this module is defined or not.
2143     @@Type:
2144     DOMMain:boolean
2145     @@Get:
2146     @@@PerlDef:
2147     $r = $self->{<Q::isDefined>};
2148     ##DISModuleDefinition
2149    
2150     ClsDef:
2151     @ClsQName: ManakaiDISForDefinition
2152     @Description:
2153     @@lang:en
2154     @@@:
2155     <QUOTE::dis> <QUOTE::for> definitions.
2156 wakaba 1.4 @ClsISA: ManakaiDISExceptionTarget
2157 wakaba 1.2
2158     @Attr:
2159     @@Name: uri
2160     @@Type: ForURI
2161     @@Description:
2162     @@@lang:en
2163     @@@@:
2164     The URI reference of this <QUOTE::for>.
2165     @@Get:
2166     @@@PerlDef:
2167     $r = $self->{uri};
2168    
2169     @Method:
2170     @@Name: isaURI
2171     @@Description:
2172     @@@lang:en
2173     @@@@:
2174     Whether this <QUOTE::for> is-a another <QUOTE::for> or not.
2175     @@Param:
2176     @@@Name: superURI
2177     @@@Type: ForURI
2178     @@@Description:
2179     @@@@lang:en
2180     @@@@@:
2181     Another <QUOTE::for> URI reference to test.
2182     @@Return:
2183     @@@Type:
2184     DOMMain:boolean
2185     @@@TrueCase:
2186     @@@@enDesc:
2187     <P::superURI> is a super-<QUOTE::for> of this <QUOTE::for>.
2188     @@@FalseCase:
2189     @@@@enDesc:
2190     <P::superURI> is not a super-<QUOTE::for> of this <QUOTE::for>.
2191     @@@PerlDef:
2192     $r = $self->{uri} eq $superURI ? true : $self->{isa}->{$superURI};
2193    
2194     @Attr:
2195     @@Name: isDefined
2196     @@Description:
2197     @@@lang:en
2198     @@@@:
2199     Whether this <QUOTE::for> is already defined or not.
2200     @@Type:
2201     DOMMain:boolean
2202     @@Get:
2203     @@@TrueCase:
2204     This <QUOTE::for> is already defined.
2205     @@@FalseCase:
2206     This <QUOTE::for> is not defined.
2207     @@@PerlDef:
2208     $r = $self->{<Q::isDefined>};
2209    
2210     @Attr:
2211     @@Name: isReferred
2212     @@Description:
2213     @@@lang:en
2214     @@@@:
2215     Whether this <QUOTE::for> is referred somewhere or not.
2216     @@Type:
2217     DOMMain:any
2218     @@Get:
2219     @@@InCase:
2220     @@@@Type:ManakaiDISElement
2221     @@@@enDesc:
2222     This <QUOTE::for> is referred by the element.
2223     @@@nullCase:
2224     This <QUOTE::for> is not referred.
2225     @@@PerlDef:
2226     $r = $self->{<Q::isReferred>};
2227     @@Set:
2228     @@@InCase:
2229     @@@@Type:ManakaiDISElement
2230     @@@@enDesc:
2231     This <QUOTE::for> is referred by the element.
2232     @@@PerlDef:
2233     $self->{<Q::isReferred>} = true if $given;
2234    
2235     @Attr:
2236     @@Name: definingModule
2237     @@Description:
2238     @@@lang:en
2239     @@@@:
2240     The <QUOTE::dis> module in which this <QUOTE::for> is defined.
2241     @@Type: ManakaiDISModuleDefinition
2242     @@Get:
2243     @@@Description:
2244     @@@@lang:en
2245     @@@@@:
2246     The module object.
2247 wakaba 1.3 @@@nullCase:
2248 wakaba 1.2 @@@@Description:
2249     @@@@@lang:en
2250     @@@@@@:
2251     This <QUOTE::for> is not associated to any module.
2252     @@@PerlDef:
2253     $r = $self->{db}
2254     -><M::ManakaiDISDatabase.getResource>
2255     ($self->{<Q::definingModule>})
2256     if defined $self->{<Q::definingModule>};
2257 wakaba 1.5
2258 wakaba 1.2 @Method:
2259 wakaba 1.5 @@Name: addISA
2260 wakaba 1.2 @@enDesc:
2261 wakaba 1.5 Adds a <QUOTE::for> to the list of super-<QUOTE::for> of this
2262     <QUOTE::for>.
2263 wakaba 1.2 @@Param:
2264 wakaba 1.5 @@@Name: superFor
2265     @@@Type: ManakaiDISForDefinition
2266     @@@enDesc:
2267     A <QUOTE::for> definition object.
2268 wakaba 1.2 @@Return:
2269     @@@PerlDef:
2270 wakaba 1.5 $superFor->{<Q::isReferred>} = true;
2271     my @from = ($self->{uri},
2272     grep {$self->{revISA}->{$_}} keys %{$self->{revISA}});
2273     my @to = ($superFor->{uri},
2274     grep {$superFor->{isa}->{$_}} keys %{$superFor->{isa}});
2275     for my $from (@from) {
2276     for my $to (@to) {
2277     $self->{isa}->{$to} = true;
2278     $superFor->{revISA}->{$from} = true;
2279     }
2280 wakaba 1.2 }
2281 wakaba 1.5
2282 wakaba 1.2 ##DISForDefinition
2283    
2284     ClsDef:
2285     @ClsQName: ManakaiDISResourceDefinition
2286     @enDesc:
2287     <QUOTE::dis> resource definitions.
2288     @ClsISA: ManakaiDISPropertyAccessor
2289 wakaba 1.4 @ClsISA: ManakaiDISExceptionTarget
2290 wakaba 1.2
2291     @Attr:
2292     @@Name: uri
2293     @@Type: ResourceURI
2294     @@Description:
2295     @@@lang:en
2296     @@@@:
2297     The URI reference of this <QUOTE::dis> resource.
2298     @@Get:
2299     @@@PerlDef:
2300     $r = $self->{uri};
2301    
2302     @Attr:
2303     @@Name: nameURI
2304     @@Type: NameURI
2305     @@enDesc:
2306     The URI reference of this <QUOTE::dis> resource, without
2307     <QUOTE::for> identifier.
2308     @@Get:
2309     @@@nullCase:
2310     @@@@enDesc:
2311     This resource does not have its name URI reference.
2312 wakaba 1.3 @@@PerlDef:
2313 wakaba 1.4 $r = $self->{nameURI};
2314 wakaba 1.2
2315     @Attr:
2316     @@Name: localName
2317     @@enDesc:
2318     The local name of this resource.
2319     @@Type:
2320 wakaba 1.3 DISCore:LocalName::ManakaiDOM:all
2321 wakaba 1.2 @@Get:
2322     @@@nullCase:
2323     @@@@enDesc:
2324     This resource does not have its local name.
2325     @@@PerlDef:
2326     $r = $self->{localName};
2327    
2328     @Attr:
2329     @@Name: namespaceURI
2330     @@Type: AnyURI
2331     @@enDesc:
2332     The namespace URI of the name of this resource.
2333     @@Get:
2334     @@@nullCase:
2335     The name of this resource does not have its namespace
2336     or this resource does not have its name.
2337     @@@PerlDef:
2338     $r = $self->{namespaceURI};
2339    
2340     @Attr:
2341     @@Name: isAnonymous
2342     @@enDesc:
2343     Whether this <QUOTE::dis> resource has name or not.
2344     @@Type:
2345     DOMMain:boolean
2346     @@Get:
2347     @@@TrueCase:
2348     This resource does not have any global unique name.
2349     <A::ManakaiDISResourceDefinition.uri> is a temporary URI reference.
2350     @@@FalseCase:
2351     This resource does have its formal name.
2352     <A::ManakaiDISResourceDefinition.uri> is a URI reference
2353     generated from the name and the <QUOTE::for> URI reference
2354     of this resource.
2355     @@@PerlDef:
2356     $r = $self->{<Q::isAnon>};
2357    
2358     @Attr:
2359     @@Name: forURI
2360     @@enDesc:
2361     The <QUOTE::for> URI reference for which this resource is defined.
2362     @@Type:ForURI
2363     @@Get:
2364     @@@PerlDef:
2365     $r = $self->{for};
2366    
2367     @Attr:
2368     @@Name: forpURI
2369     @@enDesc:
2370     The <QUOTE::for+> URI references for which this resource is defined.
2371     @@Type: ForURIList
2372     @@Get:
2373 wakaba 1.3 @@@PerlDef:
2374 wakaba 1.2 $r = $self->{forp};
2375    
2376     @Method:
2377     @@Name: subsetOfURI
2378     @@Description:
2379     @@@lang:en
2380     @@@@:
2381     Whether this resource is a subset of another resource or not.
2382     @@Param:
2383     @@@Name: superURI
2384     @@@Type: ResourceURI
2385     @@@Description:
2386     @@@@lang:en
2387     @@@@@:
2388     Another resource URI reference to test.
2389     @@Return:
2390     @@@Type:
2391     DOMMain:boolean
2392     @@@TrueCase:
2393     @@@@enDesc:
2394     <P::superURI> is a super-resource of this resource.
2395     @@@FalseCase:
2396     @@@@enDesc:
2397     <P::superURI> is not a super-resource of this resource.
2398     @@@PerlDef:
2399     $r = $superURI eq $self->{uri} ? true : $self->{subOf}->{$superURI};
2400    
2401     @Attr:
2402     @@Name: isDefined
2403     @@Description:
2404     @@@lang:en
2405     @@@@:
2406     Whether this resource is already defined or not.
2407     @@Type:
2408     DOMMain:boolean
2409     @@Get:
2410     @@@TrueCase:
2411     This resource is already defined.
2412     @@@FalseCase:
2413     This resource is not defined.
2414     @@@PerlDef:
2415     $r = $self->{<Q::isDefined>};
2416    
2417     @Attr:
2418     @@Name: isReferred
2419     @@Description:
2420     @@@lang:en
2421     @@@@:
2422     Whether this resource is referred or not.
2423     @@Type:
2424     DOMMain:any
2425     @@Get:
2426     @@@InCase:
2427     @@@@Type:ManakaiDISElement
2428     @@@@enDesc:
2429     This resource is referred by the element.
2430     @@@nullCase:
2431     This resource is not referred.
2432     @@@PerlDef:
2433     $r = $self->{<Q::isReferred>};
2434     @@Set:
2435     @@@InCase:
2436     @@@@Type:ManakaiDISElement
2437     @@@@enDesc:
2438     This resource is referred by this element.
2439     @@@PerlDef:
2440     $self->{<Q::isReferred>} = $given if $given;
2441    
2442     @Attr:
2443     @@Name: definingModule
2444     @@Description:
2445     @@@lang:en
2446     @@@@:
2447     The <QUOTE::dis> module in which this resource is defined.
2448     @@Type: ManakaiDISModuleDefinition
2449     @@Get:
2450     @@@Description:
2451     @@@@lang:en
2452     @@@@@:
2453     The module object.
2454 wakaba 1.3 @@@nullCase:
2455 wakaba 1.2 @@@@Description:
2456     @@@@@lang:en
2457     @@@@@@:
2458     This resource is not associated to any module.
2459     @@@PerlDef:
2460     $r = $self->{db}
2461     -><M::ManakaiDISDatabase.getModule>
2462     ($self->{<Q::definingModule>})
2463     if defined $self->{<Q::definingModule>};
2464     @@Set:
2465     @@@Description:
2466     @@@@lang:en
2467     @@@@@:
2468     The module object to which the <QUOTE::defining module> is set.
2469     @@@PerlDef:
2470     $self->{<Q::defininingModule>}
2471     = $given-><AG::ManakaiDISModuleDefinition.uri>;
2472    
2473     ##DISResourceDefinition
2474    
2475     ClsDef:
2476     @ClsQName: ManakaiDISPropertyAccessor
2477 wakaba 1.3 @enDesc:
2478 wakaba 1.2 Accessor methods for resource or module properties.
2479    
2480     @Method:
2481     @@Name: getPropertyText
2482     @@enDesc:
2483     Gets property value text.
2484     @@PropNameParam:
2485     @@Param:
2486     @@@Name:default
2487     @@@Type:
2488 wakaba 1.3 swcfg21:SWCFGString::swcfg21:ForLatest
2489 wakaba 1.2 @@@enDesc:
2490     The default value that is returned if no explicit property
2491     value specification found for this resource.
2492     @@@nullCase:
2493     @@@@enDesc:
2494     No default value supplied; <DOM::null> is returned if
2495     no value specified.
2496     @@Return:
2497     @@@Type:
2498 wakaba 1.3 swcfg21:SWCFGString::swcfg21:ForLatest
2499 wakaba 1.2 @@@enDesc:
2500     The property value string.
2501     @@@nullCase:
2502     @@@@enDesc:
2503     No value nor default value has specified.
2504     @@@PerlDef:
2505     if (exists $self->{$propName}) {
2506     $r = defined $self->{$propName} ? $self->{$propName} : $default;
2507     } elsif ($self->{src}) {
2508     $r = $self->{src}-><M::ManakaiDISElement.disGetAttribute>
2509     ($propName, for_arg => $self->{for},
2510     forp_arg => $self->{forp});
2511     $self->{$propName} = $r;
2512     $r = $default unless defined $r;
2513     } else {
2514     $r = $default;
2515     }
2516    
2517     @Method:
2518     @@Name: getPropertyResource
2519     @@enDesc:
2520     Gets property value resource.
2521     @@PropNameParam:
2522     @@Return:
2523     @@@Type: ManakaiDISResourceDefinition
2524     @@@enDesc:
2525     The property value resource.
2526     @@@nullCase:
2527     @@@@enDesc:
2528     No value has specified.
2529     @@@PerlDef:
2530     if (defined $self->{$propName}) {
2531     $r = $self->{db}-><M::ManakaiDISDatabase.getResource>
2532     ($self->{$propName});
2533     } else {
2534     $r = null;
2535     }
2536    
2537     @Method:
2538     @@Name: addPropertyResourceList
2539     @@enDesc:
2540     Adds a resource to a resource-list property value.
2541     \
2542     {ISSUE:: Should an exception be thrown if the property is
2543     not of list?
2544     \
2545     }
2546     @@PropNameParam:
2547     @@Param:
2548     @@@Name: res
2549     @@@Type: ManakaiDISResourceDefinition
2550     @@@enDesc:
2551     A resource to add.
2552     @@Return:
2553     @@@PerlDef:
2554     if (ref $self->{$propName} eq 'ARRAY') {
2555     push @{$self->{$propName}}, $res->{uri};
2556     } elsif (not defined $self->{$propName}) {
2557     $self->{$propName} = [$res->{uri}];
2558     }
2559    
2560 wakaba 1.3 ElementTypeBinding:
2561     @Name: PropNameParam
2562     @ElementType:
2563     dis:ResourceDef
2564     @ShadowContent:
2565     @@rdf:type:
2566     DISLang:MethodParameter
2567     @@Name: propName
2568     @@Type: ResourceURI
2569     @@Description:
2570     @@@lang:en
2571     @@@@:
2572     The name of the property.
2573    
2574 wakaba 1.2 ##DISPropertyAccessor
2575    
2576     PropDef:
2577     @QName:isAnon
2578     @Description:
2579     @@lang:en
2580     @@@:
2581     Whether the subject resource is anonymous or not.
2582     @Type:
2583     DOMMain:boolean
2584    
2585     PropDef:
2586     @QName:isDefined
2587     @Description:
2588     @@lang:en
2589     @@@:
2590     Whether the subject resource is defined or not.
2591    
2592     PropDef:
2593 wakaba 1.3 @QName:isReferred
2594 wakaba 1.2 @Description:
2595     @@lang:en
2596     @@@:
2597     Whether the subject resource is referred or not.
2598     @Type:
2599     DOMMain:any
2600    
2601     PropDef:
2602     @QName:definingModule
2603     @Description:
2604     @@lang:en
2605     @@@:
2606     The <QUOTE::dis> module in which the subject resource is defined.
2607     @rdfs:domain:
2608     DISCore:Module
2609 wakaba 1.1
2610     ## -- Datatypes
2611    
2612     URITypeDef:
2613 wakaba 1.3 @QName: AnyURI
2614     @Description:
2615     @@lang:en
2616     @@@:
2617     Any URI references.
2618    
2619     URITypeDef:
2620     @QName: FileURI
2621     @enDesc:
2622     URI references identifying file.
2623    
2624     URITypeDef:
2625 wakaba 1.1 @QName: ForURI
2626     @Description:
2627     @@lang:en
2628     @@@:
2629     <QUOTE::For> URI references.
2630    
2631     DataTypeDef:
2632     @QName: ForURIList
2633     @Description:
2634     @@lang:en
2635     @@@:
2636     References to the array containing <QUOTE::for> URI references.
2637    
2638     URITypeDef:
2639 wakaba 1.3 @QName: ResourceURI
2640     @Description:
2641     @@lang:en
2642     @@@:
2643     A URI reference for a <QUOTE::dis> resource.
2644    
2645     URITypeDef:
2646 wakaba 1.1 @QName: MediaTypeURI
2647     @Description:
2648     @@lang:en
2649     @@@:
2650     Media type URI references.
2651 wakaba 1.3 @rdfs:subClassOf: ResourceURI
2652    
2653     URITypeDef:
2654     @QName: ModuleURI
2655     @enDesc:
2656     URI references for <QUOET::dis> modules.
2657     @rdfs:subClassOf: ResourceURI
2658    
2659     URITypeDef:
2660     @QName: NameURI
2661     @enDesc:
2662     URI references identifying a resource.
2663     @rdfs:subClassOf: ResourceURI
2664    
2665     ElementTypeBinding:
2666     @Name: DataTypeDef
2667     @ElementType:
2668     dis:ResourceDef
2669     @ShadowContent:
2670     @@rdf:type:
2671     ManakaiDOM:DataType
2672    
2673     ElementTypeBinding:
2674     @Name: URITypeDef
2675     @ElementType:
2676     dis:ResourceDef
2677     @ShadowContent:
2678     @@rdf:type:
2679     ManakaiDOM:DataType
2680     @@rdfs:subClassOf: AnyURI
2681 wakaba 1.1
2682     ## -- Exceptions
2683    
2684     XParamDef:
2685     @QName: sourceNode
2686     @Description:
2687     @@lang:en
2688     @@@:
2689 wakaba 1.4 The node in which an error has occurred.
2690 wakaba 1.5 @Type: ManakaiDISNode
2691    
2692     XParamDef:
2693     @QName: anotherSourceNode
2694     @enDesc:
2695     Another source node in which an error has occurred. In cases
2696     of <QUOTE::already defined> errors, it is the node that
2697     defines the resource first.
2698     @Type: ManakaiDISNode
2699 wakaba 1.3
2700     ExceptionDef:
2701     @ClsQName: ManakaiDISException
2702     @enDesc:
2703     Exceptions for the <QUOTE::dis> operations.
2704 wakaba 1.4 @ClsISA:
2705     ManakaiDOM:ManakaiDOMException::ManakaiDOM:Perl
2706 wakaba 1.3 @XConstGroupDef:
2707     @@ClsQName: ManakaiDISExceptionCode
2708     @@enDesc:
2709     Exception codes for <Class::ManakaiDISException>.
2710     @@XConstDef:
2711     @@@Name: NAMESPACE_ERR
2712     @@@Value:14
2713     @@@enDesc:
2714     An error related to namespaces has occurred.
2715     @@@XSubTypeDef:
2716     @@@@QName: UNDECLARED_NS_PREFIX_ERR
2717     @@@@enDesc:
2718     The implementation has encounted an undeclared namespace
2719     prefix.
2720     @@XConstDef:
2721     @@@Name: INVALID_STATE_ERR
2722     @@@Value:11
2723     @@@enDesc:
2724     An attempt is made to use an object that is not (or no longer) usable.
2725     @@@XSubTypeDef:
2726     @@@@QName: NO_ASSOCIATED_DB_ERR
2727     @@@@enDesc:
2728     No <QUOTE::dis> database has been associated with this document.
2729 wakaba 1.4 @@XConstDef:
2730     @@@Name: INVALID_SOURCE_ERR
2731     @@@Value: 200
2732     @@@enDesc:
2733     The source input is well-formed but invalid.
2734     @@@XSubTypeDef:
2735     @@@@QName: NO_MODULE_QNAME_ERR
2736     @@@@enDesc:
2737     The <Q::dis:Module> element must have its <Q::dis:QName>
2738     attribute.
2739     @@@XSubTypeDef:
2740     @@@@QName: UNABLE_TO_GET_MODULE_ERR
2741     @@@@enDesc:
2742     The implementation is unable to get the module source.
2743     @@@@Def:
2744     @@@@@ContentType:
2745     lang:muf
2746     @@@@@lang:en
2747     @@@@@@:
2748     Unable to get the module source of <%p (name => {<Q::DIS:uri>});>
2749     @@@@XParam:
2750     @@@@@QName: uri
2751     @@@@@enDesc:
2752     The URI reference of the module.
2753     @@@@XParam:
2754     @@@@@QName: namespaceURI
2755     @@@@@enDesc:
2756     The namespace URI of the module name.
2757     @@@@XParam:
2758     @@@@@QName: localName
2759     @@@@@enDesc:
2760     The local name of the module name.
2761     @@@@XParam:
2762     @@@@@QName: for
2763     @@@@@enDesc:
2764     The <QUOTE::for> of the module.
2765 wakaba 1.5 @@@XSubTypeDef:
2766     @@@@QName: NO_FOR_QNAME_ERR
2767     @@@@enDesc:
2768     A <Q::dis:ForDef> element must have <Q::dis:QName> attribute.
2769     @@@@XSourceNodeParam:
2770     @@@XSubTypeDef:
2771     @@@@QName: FOR_ALREADY_DEFINED_ERR
2772     @@@@enDesc:
2773     The <QUOTE::for> named as the same URI reference has
2774     already defined.
2775     @@@@XSourceNodeParam:
2776     @@@@XParam:
2777     @@@@@QName: anotherSourceNode
2778     @@@@@enDesc:
2779     The node that defines the <QUOTE::for> URI reference before.
2780     @@@XSubTypeDef:
2781     @@@@QName: RESOURCE_ALREADY_DEFINED_ERR
2782     @@@@enDesc:
2783     The <QUOTE::dis> resource named as the same URI reference has
2784     already defined.
2785     @@@@XSourceNodeParam:
2786     @@@@XParam:
2787     @@@@@QName: anotherSourceNode
2788     @@@@@enDesc:
2789     The node that defines the <QUOTE::for> URI reference before.
2790     @@@XSubTypeDef:
2791     @@@@QName: ELEMENT_NOT_ALLOWED_ERR
2792     @@@@enDesc:
2793     An element has occured where it is not allowed.
2794     @@@@enMufDef:
2795     Module <%p (name => {<Q::DIS:uri>});>:
2796     Element of type <%p (name => {<Q::DIS:elementType>});>
2797     is not allowed here
2798     @@@@XSourceNodeParam:
2799     @@@@XParam:
2800     @@@@@QName: elementType
2801     @@@@@enDesc:
2802     The expanded element type name of the element.
2803     @@@@XParam:
2804     @@@@@QName: uri
2805     @@@@@enDesc:
2806     The URI reference of the module.
2807 wakaba 1.4 ##DISException
2808 wakaba 1.5
2809     XParamDef:
2810     @QName: elementType
2811     @Type: ResourceURI
2812     @enDesc:
2813     The name of the element type.
2814    
2815     XParamDef:
2816     @QName: uri
2817     @Type: ResourceURI
2818     @enDesc:
2819     The name of the resource, composed from <Q::namespaceURI>,
2820     <Q::localName> and <Q::for>.
2821    
2822     XParamDef:
2823     @QName: localName
2824     @Type:
2825     DISCore:LocalName
2826     @enDesc:
2827     The local name of the resource, unique in <Q::namespaceURI> namespace.
2828    
2829     XParamDef:
2830     @QName: namespaceURI
2831     @Type: AnyURI
2832     @enDesc:
2833     The namespace URI reference of the resource name.
2834    
2835     XParamDef:
2836     @QName: for
2837     @Type: ForURI
2838     @enDesc:
2839     The <QUOTE::for> URI reference of the resource.
2840    
2841     ElementTypeBinding:
2842     @Name: XSourceNodeParam
2843     @ElementType:
2844     ManakaiDOM:exceptionOrWarningParameter
2845     @ShadowContent:
2846     @@QName: sourceNode
2847     @@Description:
2848     @@@lang:en
2849     @@@@:
2850     The node in which an error has occurred.
2851 wakaba 1.4
2852     ClsDef:
2853     @ClsQName: ManakaiDISExceptionTarget
2854     @enDesc:
2855     Objects that is able to be the target of an exception.
2856     @IntMethod:
2857     @@Operator:
2858     @@@@:
2859     ManakaiDOM:MUErrorHandler
2860     @@@ContentType:
2861     dis:TypeQName
2862     @@Description:
2863     @@@lang:en
2864     @@@@:
2865     This method is a generic error handler; all manakai exceptions
2866     and warnings associated to an object are once reported to this method
2867     and then delivered to appropriate entities.
2868     \
2869     If the error is an exception (such as <X::DOMCore:DOMException> or
2870     <X::ManakaiDOM:ManakaiDOMImplementationException>), it is
2871     simply thrown. If the error is only a warning, it is reported
2872     via the <IF::DOMCore:DOMError> interface.
2873     \
2874     See <PerlModule::Message::Util::Error> documentation for more
2875     information on the error reporting mechanism.
2876     \
2877     {NOTE:: This kind of methods are named as <Perl::___report_error>
2878     in the convention of <PerlModule::Message::Util::Error>.
2879     \
2880     }
2881     @@Param:
2882     @@@Name:err
2883     @@@Type:
2884     ManakaiDOM:ManakaiDOMExceptionOrWarning::ManakaiDOM:Perl
2885     @@@Description:
2886     @@@@lang:en
2887     @@@@@:
2888     An exception object that describes what kind of error it is
2889     and how it should be recovered.
2890     \
2891     {NOTE:: Exception objects in manakai implementation
2892     inherit the class <PerlModule::Message::Util::Error>,
2893     that in turn inherits <PerlModule::Error>.
2894     \
2895     }
2896     @@Return:
2897     @@@PerlDef:
2898     if ($err->isa (<ClassName::ManakaiDOM:ManakaiDOMException
2899     ::ManakaiDOM:Perl>)) {
2900     $err->throw;
2901     } else {
2902     \## TODO: Implement warning reporting
2903     warn $err->stringify;
2904     }
2905     ##DISExceptionTarget
2906    
2907     ForDef:
2908     @QName:
2909     DIS:ForIF
2910     ForDef:
2911     @QName:
2912     DIS:ForClass
2913    
2914     ElementTypeBinding:
2915     @Name: IFClsDef
2916     @ElementType:
2917     dis:ResourceDef
2918     @ShadowContent:
2919     @@rdf:type:
2920     @@@@:
2921     dis:MultipleResource
2922     @@@ForCheck: !ForClass !ForIF
2923     @@rdf:type:
2924     @@@@:
2925     ManakaiDOM:IF
2926     @@@ForCheck: ForIF
2927     @@rdf:type:
2928     @@@@:
2929     ManakaiDOM:Class
2930     @@@ForCheck: ForClass
2931     @@resourceFor: ForIF
2932     @@resourceFor:
2933     @@@@: ForClass
2934     @@@ForCheck: ForLatest
2935     @@DOMMain:implementFeature:
2936     @@@@:CoreFeature10
2937     @@@ForCheck: ForClass
2938     @@ForCheck:
2939     ManakaiDOM:Perl
2940 wakaba 1.3
2941     ElementTypeBinding:
2942     @Name: ClsDef
2943     @ElementType:
2944     dis:ResourceDef
2945     @ShadowContent:
2946     @@rdf:type:
2947     ManakaiDOM:Class
2948     @@AliasFor:
2949     @@@@:
2950     ::ForLatest
2951     @@@For:
2952     !=ForLatest
2953     @@ForCheck:
2954     ManakaiDOM:Perl
2955     @@DOMMain:implementFeature: CoreFeature10
2956    
2957     ElementTypeBinding:
2958     @Name: ExceptionDef
2959     @ElementType:
2960     dis:ResourceDef
2961     @ShadowContent:
2962     @@rdf:type:
2963     ManakaiDOM:ExceptionClass
2964     @@AliasFor:
2965     @@@@:
2966     ::ForLatest
2967     @@@For:
2968     !=ForLatest
2969     @@ForCheck:
2970     ManakaiDOM:Perl
2971     @@DOMMain:implementFeature: CoreFeature10
2972    
2973     ElementTypeBinding:
2974     @Name: ClsQName
2975     @ElementType:
2976     dis:QName
2977    
2978     ElementTypeBinding:
2979     @Name: ClsISA
2980     @ElementType:
2981     dis:ISA
2982    
2983     ElementTypeBinding:
2984     @Name: Method
2985     @ElementType:
2986     dis:ResourceDef
2987     @ShadowContent:
2988     @@rdf:type:
2989     DISLang:Method
2990    
2991     ElementTypeBinding:
2992     @Name: IntMethod
2993     @ElementType:
2994     dis:ResourceDef
2995     @ShadowContent:
2996     @@rdf:type:
2997     DISLang:Method
2998     @@ManakaiDOM:isForInternal:1
2999    
3000     ElementTypeBinding:
3001     @Name: Attr
3002     @ElementType:
3003     dis:ResourceDef
3004     @ShadowContent:
3005     @@rdf:type:
3006     DISLang:Attribute
3007    
3008     ElementTypeBinding:
3009     @Name: Return
3010     @ElementType:
3011     dis:ResourceDef
3012     @ShadowContent:
3013     @@rdf:type:
3014     DISLang:MethodReturn
3015    
3016     ElementTypeBinding:
3017     @Name: Get
3018     @ElementType:
3019     dis:ResourceDef
3020     @ShadowContent:
3021     @@rdf:type:
3022     DISLang:AttributeGet
3023    
3024     ElementTypeBinding:
3025     @Name: Set
3026     @ElementType:
3027     dis:ResourceDef
3028     @ShadowContent:
3029     @@rdf:type:
3030     DISLang:AttributeSet
3031    
3032     ElementTypeBinding:
3033     @Name: Param
3034     @ElementType:
3035     dis:ResourceDef
3036     @ShadowContent:
3037     @@rdf:type:
3038     DISLang:MethodParameter
3039    
3040     ElementTypeBinding:
3041     @Name: PerlDef
3042     @ElementType:
3043     dis:Def
3044     @ShadowContent:
3045     @@ContentType:
3046     lang:Perl
3047    
3048     ElementTypeBinding:
3049     @Name: disDef
3050     @ElementType:
3051     dis:Def
3052     @ShadowContent:
3053     @@ContentType:
3054     lang:dis
3055    
3056     ElementTypeBinding:
3057     @Name: InCase
3058     @ElementType:
3059     dis:ResourceDef
3060     @ShadowContent:
3061     @@rdf:type:
3062     ManakaiDOM:InCase
3063    
3064     ElementTypeBinding:
3065     @Name: nullCase
3066     @ElementType:
3067     dis:ResourceDef
3068     @ShadowContent:
3069     @@rdf:type:
3070     ManakaiDOM:InCase
3071     @@Value:
3072     @@@is-null:1
3073    
3074     ElementTypeBinding:
3075     @Name: TrueCase
3076     @ElementType:
3077     dis:ResourceDef
3078     @ShadowContent:
3079     @@rdf:type:
3080     ManakaiDOM:InCase
3081     @@Value:true
3082     @@Type:
3083     DOMMain:boolean
3084    
3085    
3086     ElementTypeBinding:
3087     @Name: FalseCase
3088     @ElementType:
3089     dis:ResourceDef
3090     @ShadowContent:
3091     @@rdf:type:
3092     ManakaiDOM:InCase
3093     @@Value:false
3094     @@Type:
3095     DOMMain:boolean
3096    
3097     ElementTypeBinding:
3098     @Name: enDesc
3099     @ElementType:
3100     dis:Description
3101     @ShadowContent:
3102     @@lang:en
3103    
3104     ElementTypeBinding:
3105     @Name: PropDef
3106     @ElementType:
3107     dis:ResourceDef
3108     @ShadowContent:
3109     @@rdf:type:
3110     rdf:Property
3111     @@AliasFor:
3112     @@@@:
3113     ::ManakaiDOM:all
3114     @@@For:
3115     !=ManakaiDOM:all
3116    
3117     ElementTypeBinding:
3118     @Name: MethodRedef
3119     @ElementType:
3120     dis:ResourceDef
3121     @ShadowContent:
3122     @@rdf:type:
3123     DISLang:Method
3124     @@ManakaiDOM:isRedefining:1
3125    
3126     ElementTypeBinding:
3127     @Name: NamedParam
3128     @ElementType:
3129     dis:ResourceDef
3130     @ShadowContent:
3131     @@rdf:type:
3132     DISLang:MethodParameter
3133     @@DISPerl:isNamedParameter:1
3134    
3135     ElementTypeBinding:
3136     @Name: NodeParam
3137     @ElementType:
3138     dis:ResourceDef
3139     @ShadowContent:
3140     @@rdf:type:
3141     DISLang:MethodParameter
3142     @@DISPerl:isNamedParameter:1
3143     @@Name: node
3144     @@Type: ManakaiDISNode
3145     @@Description:
3146     @@@lang:en
3147     @@@@:
3148     The node in which the name has occurred. It is intended
3149     to be reported when an exception had been raised.
3150     @@ResourceDef:
3151     @@@rdf:type:
3152     ManakaiDOM:InCase
3153     @@@Value:
3154     @@@@is-null:1
3155     @@@Description:
3156     @@@@lang:en
3157     @@@@@:
3158     The source of the name is not a node.
3159    
3160     ElementTypeBinding:
3161     @Name: ForParam
3162     @ElementType:
3163     dis:ResourceDef
3164     @ShadowContent:
3165     @@rdf:type:
3166     DISLang:MethodParameter
3167     @@DISPerl:isNamedParameter:1
3168     @@Name: forArg
3169     @@Type: ForURI
3170     @@Description:
3171     @@@lang:en
3172     @@@@:
3173     The <QUOTE::for> URI reference.
3174     @@ResourceDef:
3175     @@@rdf:type:
3176     ManakaiDOM:InCase
3177     @@@Value:
3178     @@@@is-null:1
3179     @@@Description:
3180     @@@@lang:en
3181     @@@@@:
3182     Equivalent to <Q::ManakaiDOM:all>, i.e. <QUOTE::for all>.
3183    
3184     ElementTypeBinding:
3185     @Name: ForpParam
3186     @ElementType:
3187     dis:ResourceDef
3188     @ShadowContent:
3189     @@rdf:type:
3190     DISLang:MethodParameter
3191     @@DISPerl:isNamedParameter:1
3192     @@Name: forpArg
3193     @@Type: ForURIList
3194     @@Description:
3195     @@@lang:en
3196     @@@@:
3197     An array reference containing additional <QUOTE::for>
3198     constraints (<QUOTE::For+> list).
3199     @@ResourceDef:
3200     @@@rdf:type:
3201     ManakaiDOM:InCase
3202     @@@Value:
3203     @@@@is-null:1
3204     @@@Description:
3205     @@@@lang:en
3206     @@@@@:
3207     Equivalent to the empty array reference.
3208    
3209     ElementTypeBinding:
3210     @Name: MediaTypeParam
3211     @ElementType:
3212     dis:ResourceDef
3213     @ShadowContent:
3214     @@rdf:type:
3215     DISLang:MethodParameter
3216     @@DISPerl:isNamedParameter:1
3217     @@Name: mediaType
3218     @@Type: MediaTypeURI
3219     @@Description:
3220     @@@lang:en
3221     @@@@:
3222     The URI reference identifying a media type.
3223     @@ResourceDef:
3224     @@@rdf:type:
3225     ManakaiDOM:InCase
3226     @@@Value:
3227     @@@@is-null:1
3228     @@@Description:
3229     @@@@lang:en
3230     @@@@@:
3231     No media type specified.
3232    
3233     ElementTypeBinding:
3234     @Name: MediaTypeDefaultParam
3235     @ElementType:
3236     dis:ResourceDef
3237     @ShadowContent:
3238     @@rdf:type:
3239     DISLang:MethodParameter
3240     @@DISPerl:isNamedParameter:1
3241     @@Name: defaultMediaType
3242     @@Type: MediaTypeURI
3243     @@Description:
3244     @@@lang:en
3245     @@@@:
3246     The default media type, i.e. the type used when no explicit
3247     specification is not found in the source tree.
3248     @@ResourceDef:
3249     @@@rdf:type:
3250     ManakaiDOM:InCase
3251     @@@Value:
3252     @@@@is-null:1
3253     @@@Description:
3254     @@@@lang:en
3255     @@@@@:
3256     Defaulted to <Q::DOMMain:any>.
3257    
3258     ElementTypeBinding:
3259     @Name: RaiseException
3260     @ElementType:
3261     ManakaiDOM:raises
3262    
3263     ElementTypeBinding:
3264     @Name: UndeclaredPrefixException
3265     @ElementType:
3266     ManakaiDOM:raises
3267     @ShadowContent:
3268     @@@: UNDECLARED_NS_PREFIX_ERR
3269     @@Description:
3270     @@@lang:en
3271     @@@@:
3272     The implementation has encounted an undeclared namespace prefix.
3273    
3274     ElementTypeBinding:
3275     @Name: NoDBException
3276     @ElementType:
3277     ManakaiDOM:raises
3278     @ShadowContent:
3279     @@@: NO_DB_ASSOCIATED_ERR
3280     @@Description:
3281     @@@lang:en
3282     @@@@:
3283     No <QUOTE::dis> database is associated to this document.
3284    
3285     ElementTypeBinding:
3286     @Name: XConstGroupDef
3287     @ElementType:
3288     dis:ResourceDef
3289     @ShadowContent:
3290     @@rdf:type:
3291     ManakaiDOM:ConstGroup
3292     @@Type:
3293     DOMMain:unsigned-short::ManakaiDOM:all
3294     @@rdfs:subClassOf:
3295     DOMMain:unsigned-short::ManakaiDOM:all
3296    
3297     ElementTypeBinding:
3298     @Name: XConstDef
3299     @ElementType:
3300     dis:ResourceDef
3301     @ShadowContent:
3302     @@rdf:type:
3303     ManakaiDOM:Const
3304    
3305     ElementTypeBinding:
3306     @Name: XSubTypeDef
3307     @ElementType:
3308     dis:ResourceDef
3309     @ShadowContent:
3310     @@rdf:type:
3311     ManakaiDOM:ExceptionOrWarningSubType
3312    
3313     ElementTypeBinding:
3314     @Name: XParam
3315     @ElementType:
3316     ManakaiDOM:exceptionOrWarningParameter
3317    
3318     ElementTypeBinding:
3319     @Name: XParamDef
3320     @ElementType:
3321     dis:ResourceDef
3322     @ShadowContent:
3323     @@rdf:type:
3324     DOMMain:XWParameter
3325     @@AliasFor:
3326     @@@For:
3327     !=ManakaiDOM:all
3328     @@@@:
3329     ::ManakaiDOM:all
3330    
3331     ElementTypeBinding:
3332     @Name: enMufDef
3333     @ElementType:
3334     dis:Def
3335     @ShadowContent:
3336     @@ContentType:
3337     lang:muf
3338     @@lang:en
3339    

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24