2 <xsl:stylesheet version=
"1.0"
3 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform">
4 <xsl:output method=
"xml" encoding=
"UTF-8" />
5 <xsl:template match=
"/">
8 <NAME>backup-from-blackboard.zip
</NAME>
9 <MOODLE_VERSION>2004083100</MOODLE_VERSION>
10 <MOODLE_RELEASE>1.4</MOODLE_RELEASE>
11 <BACKUP_VERSION>2004083100</BACKUP_VERSION>
12 <BACKUP_RELEASE>1.4</BACKUP_RELEASE>
13 <DATE>1094240862</DATE>
14 <ORIGINAL_WWWROOT>INSERT URL HERE
</ORIGINAL_WWWROOT>
17 <NAME>assignment
</NAME>
18 <INCLUDED>true
</INCLUDED>
19 <USERINFO>true
</USERINFO>
23 <INCLUDED>true
</INCLUDED>
24 <USERINFO>true
</USERINFO>
28 <INCLUDED>true
</INCLUDED>
29 <USERINFO>true
</USERINFO>
33 <INCLUDED>true
</INCLUDED>
34 <USERINFO>true
</USERINFO>
38 <INCLUDED>true
</INCLUDED>
39 <USERINFO>true
</USERINFO>
43 <INCLUDED>true
</INCLUDED>
44 <USERINFO>true
</USERINFO>
48 <INCLUDED>true
</INCLUDED>
49 <USERINFO>true
</USERINFO>
53 <INCLUDED>true
</INCLUDED>
54 <USERINFO>true
</USERINFO>
58 <INCLUDED>false
</INCLUDED>
59 <USERINFO>false
</USERINFO>
63 <INCLUDED>true
</INCLUDED>
64 <USERINFO>true
</USERINFO>
68 <INCLUDED>false
</INCLUDED>
69 <USERINFO>false
</USERINFO>
73 <INCLUDED>false
</INCLUDED>
74 <USERINFO>false
</USERINFO>
78 <INCLUDED>false
</INCLUDED>
79 <USERINFO>false
</USERINFO>
83 <INCLUDED>true
</INCLUDED>
84 <USERINFO>true
</USERINFO>
88 <USERFILES>false
</USERFILES>
89 <COURSEFILES>true
</COURSEFILES>
93 <!-- Get course specific information -->
94 <xsl:apply-templates select=
"document('res00001.dat')//COURSE"/>
98 <!-- Create a title section -->
99 <xsl:for-each select=
"document('res00001.dat')" >
100 <xsl:call-template name=
"title_section" />
104 <!-- Create a topic for each top level Bb item and add section modules ONE folder deep -->
105 <xsl:for-each select=
"manifest/organizations/tableofcontents/item">
106 <xsl:variable name=
"section_number" select=
"position()"/>
107 <xsl:call-template name=
"sections">
108 <xsl:with-param name=
"section_number" select=
"$section_number"/>
109 <xsl:with-param name=
"recurse" >false
</xsl:with-param>
113 <!-- Create a topic for each second level Bb item which is a folder, recursively make section modules -->
114 <xsl:for-each select=
"manifest/organizations/tableofcontents/item/item">
115 <xsl:sort order=
"descending" select=
"document(concat(@identifierref,'.dat'))/CONTENT/FLAGS/ISFOLDER/@value"/>
116 <xsl:if test=
"document(concat(@identifierref,'.dat'))/CONTENT/FLAGS/ISFOLDER/@value = 'true'">
117 <xsl:variable name=
"prev_sections" select=
"count(/manifest/organizations/tableofcontents/item)"/>
118 <xsl:variable name=
"section_number" select=
"position()+$prev_sections"/>
119 <xsl:call-template name=
"sections">
120 <xsl:with-param name=
"section_number" select=
"$section_number"/>
121 <xsl:with-param name=
"recurse" >true
</xsl:with-param>
128 <xsl:call-template name=
"modules" />
135 <xsl:template match=
"COURSE">
140 <NAME><xsl:value-of select=
"CATEGORIES/CATEGORY/@value"/></NAME>
142 <PASSWORD></PASSWORD>
143 <IDNUMBER>4</IDNUMBER>
144 <FORMAT>topics
</FORMAT>
145 <SHOWGRADES>1</SHOWGRADES>
146 <BLOCKINFO>participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity
</BLOCKINFO>
147 <NEWSITEMS>5</NEWSITEMS>
148 <TEACHER>Teacher
</TEACHER>
149 <TEACHERS>Teachers
</TEACHERS>
150 <STUDENT>Student
</STUDENT>
151 <STUDENTS>Students
</STUDENTS>
154 <xsl:when test=
"FLAGS/ALLOWGUESTS/@value = 'true' ">1</xsl:when>
155 <xsl:when test=
"FLAGS/ALLOWGUESTS/@value = 'false' ">0</xsl:when>
156 <xsl:otherwise></xsl:otherwise>
159 <STARTDATE>1094270400</STARTDATE>
160 <ENROLPERIOD>0</ENROLPERIOD>
161 <NUMSECTIONS>10</NUMSECTIONS>
162 <MAXBYTES>2097152</MAXBYTES>
163 <SHOWREPORTS>0</SHOWREPORTS>
164 <GROUPMODE>0</GROUPMODE>
165 <GROUPMODEFORCE>0</GROUPMODEFORCE>
171 <xsl:when test=
"FLAGS/ISAVAILABLE/@value = 'true' ">1</xsl:when>
172 <xsl:when test=
"FLAGS/ISAVAILABLE/@value = 'false' ">0</xsl:when>
173 <xsl:otherwise></xsl:otherwise>
176 <HIDDENSECTIONS>0</HIDDENSECTIONS>
177 <TIMECREATED>1094240775</TIMECREATED>
178 <TIMEMODIFIED>1094240775</TIMEMODIFIED>
179 <SUMMARY><xsl:value-of select=
"DESCRIPTION"/></SUMMARY>
180 <SHORTNAME><xsl:value-of select=
"COURSEID/@value"/></SHORTNAME>
181 <FULLNAME><xsl:value-of select=
"TITLE/@value"/></FULLNAME>
185 <!-- ############# Sections ############# -->
187 <xsl:template name=
"title_section" match=
"resource">
191 <SUMMARY><div
style=
"text-align: center;"><font
size=
"5" style=
"font-family: arial,helvetica,sans-serif;"><xsl:value-of select=
"COURSE/TITLE/@value"/></font
></div
>
192 <xsl:value-of select=
"COURSE/DESCRIPTION"/>
196 <xsl:call-template name=
"news_forum_section_mod" >
197 <xsl:with-param name=
"mod_number">1</xsl:with-param>
203 <xsl:template name=
"sections" match=
"resource">
204 <xsl:param name=
"section_number">1.
</xsl:param>
205 <xsl:param name=
"recurse"/>
207 <ID><xsl:value-of select=
"$section_number"/></ID>
208 <NUMBER><xsl:value-of select=
"$section_number"/></NUMBER>
209 <SUMMARY><span
style=
"font-weight: bold;"><xsl:value-of select=
"@title"/></span
></SUMMARY>
214 <xsl:when test=
"$recurse = 'true'">
215 <xsl:variable name=
"mod_number" select=
"substring-after(@identifierref,'res')"/>
216 <xsl:call-template name=
"item_recurse_files" >
217 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
218 <xsl:with-param name=
"indent" >0</xsl:with-param>
219 <xsl:with-param name=
"recurse" select=
"$recurse" />
224 <xsl:when test=
"$recurse = 'false'">
225 <xsl:for-each select=
"item">
226 <xsl:variable name=
"mod_number" select=
"substring-after(@identifierref,'res')"/>
227 <!-- Create one section-mod -->
228 <xsl:for-each select=
"document(concat(@identifierref,'.dat'))">
229 <xsl:call-template name=
"section_mod">
230 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
231 <xsl:with-param name=
"indent" select=
"0"/>
243 <xsl:template name=
"item_recurse_files">
244 <xsl:param name=
"mod_number">1.
</xsl:param>
245 <xsl:param name=
"indent">1.
</xsl:param>
246 <xsl:param name=
"recurse"/>
249 <!-- Create one section-mod -->
250 <xsl:for-each select=
"document(concat(@identifierref,'.dat'))">
251 <xsl:call-template name=
"section_mod">
252 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
253 <xsl:with-param name=
"indent" select=
"$indent"/>
257 <!-- Depth first recursion to preserve order -->
258 <xsl:for-each select=
"item">
259 <xsl:variable name=
"m_number" select=
"substring-after(@identifierref,'res')"/>
260 <xsl:call-template name=
"item_recurse_files" >
261 <xsl:with-param name=
"mod_number" select=
"$m_number"/>
262 <xsl:with-param name=
"indent" select=
"$indent + 1"/>
269 <!-- Determines the type of section mod entry and calls the appropriate creation template -->
270 <xsl:template name=
"section_mod" >
271 <xsl:param name=
"mod_number">1.
</xsl:param>
272 <xsl:param name=
"contenttype" />
273 <xsl:param name=
"indent">1.
</xsl:param>
275 <!-- Every file will have a label module describing it -->
277 <!-- Detected one or more files -->
278 <xsl:when test=
"CONTENT/FILES/FILEREF/RELFILE/@value != ''">
279 <!-- Create a label -->
280 <xsl:call-template name=
"section_mod_generic">
281 <xsl:with-param name=
"mod_number" ><xsl:value-of select=
"$mod_number"/></xsl:with-param>
282 <xsl:with-param name=
"indent" ><xsl:value-of select=
"$indent"/></xsl:with-param>
283 <xsl:with-param name=
"type" >label
</xsl:with-param>
286 <!-- Create a resource for each file -->
287 <xsl:for-each select=
"CONTENT/FILES/FILEREF">
288 <xsl:call-template name=
"section_mod_generic">
289 <xsl:with-param name=
"mod_number" ><xsl:value-of select=
"$mod_number"/>0<xsl:value-of select=
"position()"/></xsl:with-param>
290 <xsl:with-param name=
"indent" select=
"$indent + 1"/>
291 <xsl:with-param name=
"type" >resource
</xsl:with-param>
298 <!-- Detected a folder -->
299 <xsl:when test=
"CONTENT/FLAGS/ISFOLDER/@value = 'true'">
300 <!-- Create a label -->
301 <xsl:call-template name=
"section_mod_generic">
302 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
303 <xsl:with-param name=
"indent" select=
"$indent"/>
304 <xsl:with-param name=
"type" >label
</xsl:with-param>
308 <!-- Detected text -->
309 <xsl:when test=
"CONTENT/MAINDATA/FLAGS/ISHTML/@value = 'true'">
310 <!-- Create a resource -->
311 <xsl:call-template name=
"section_mod_generic">
312 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
313 <xsl:with-param name=
"indent" select=
"$indent"/>
314 <xsl:with-param name=
"type" >resource
</xsl:with-param>
318 <!-- Detected external link -->
319 <xsl:when test=
"EXTERNALLINK/TITLE/@value != '' ">
320 <!-- Create a label -->
321 <xsl:call-template name=
"section_mod_generic">
322 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
323 <xsl:with-param name=
"indent" select=
"$indent"/>
324 <xsl:with-param name=
"type" >label
</xsl:with-param>
327 <!-- Create a resource -->
328 <xsl:call-template name=
"section_mod_generic">
329 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
330 <xsl:with-param name=
"indent" select=
"$indent"/>
331 <xsl:with-param name=
"type" >resource
</xsl:with-param>
335 <!-- Detected staffinfo -->
336 <xsl:when test=
"STAFFINFO/COURSEID/@value != '' ">
337 <!-- Create a resource -->
338 <xsl:call-template name=
"section_mod_generic">
339 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
340 <xsl:with-param name=
"indent" select=
"$indent"/>
341 <xsl:with-param name=
"type" >resource
</xsl:with-param>
342 </xsl:call-template> -->
352 <!-- ############# Section Modules ############# -->
353 <!-- Creates one section module entry.
354 Works for types: label, resource (text), resource (externallink)
356 <xsl:template name=
"section_mod_generic" >
357 <xsl:param name=
"mod_number">1.
</xsl:param>
358 <xsl:param name=
"indent">1.
</xsl:param>
359 <xsl:param name=
"type"/>
362 <ID><xsl:if test=
"$type = 'label'">1</xsl:if><xsl:value-of select=
"$mod_number"/>0</ID>
364 <xsl:value-of select=
"CONTENT/TITLE"/>
365 <xsl:value-of select=
"EXTERNALLINK/TITLE/@value"/>
367 <TYPE><xsl:value-of select=
"$type"/></TYPE>
368 <INSTANCE><xsl:value-of select=
"$mod_number"/></INSTANCE>
369 <ADDED>1094240775</ADDED>
372 <INDENT><xsl:value-of select=
"$indent"/></INDENT>
374 <GROUPMODE>0</GROUPMODE>
379 <!-- ############# Modules ############# -->
380 <!-- Creates a module-label entry -->
381 <xsl:template name=
"module_label" >
382 <xsl:param name=
"mod_number">1.
</xsl:param>
384 <ID><xsl:value-of select=
"$mod_number"/></ID>
385 <LABELFOUND></LABELFOUND>
386 <MODTYPE>label
</MODTYPE>
388 <!-- for CONTENT text -->
389 <xsl:value-of select=
"TITLE"/>
390 <!-- for EXTERNALLINK text -->
391 <xsl:value-of select=
"TITLE/@value"/>
394 <span
style=
"font-style: italic;">
395 <!-- for CONTENT text -->
396 <xsl:value-of select=
"TITLE"/>
397 <!-- for EXTERNALLINK text -->
398 <xsl:value-of select=
"TITLE/@value"/>
400 <!-- for CONTENT text -->
401 <xsl:value-of select=
"MAINDATA/TEXT"/>
402 <!-- for EXTERNALLINK text -->
403 <xsl:value-of select=
"DESCRIPTION/TEXT"/>
405 <TIMEMODIFIED>1094240775</TIMEMODIFIED>
409 <!-- Creates one module-file entry -->
410 <xsl:template name=
"module_file" >
411 <xsl:param name=
"mod_number">1.
</xsl:param>
412 <xsl:param name=
"summary"/>
414 <ID><xsl:value-of select=
"$mod_number"/></ID>
415 <MODTYPE>resource
</MODTYPE>
417 <!-- <xsl:value-of select="FILES/FILEREF/RELFILE/@value"/> -->
418 <xsl:value-of select=
"RELFILE/@value"/>
422 <!-- <xsl:value-of select="FILES/FILEREF/CONTENTID/@value"/>/<xsl:value-of select="FILES/FILEREF/RELFILE/@value"/> -->
423 <xsl:value-of select=
"CONTENTID/@value"/>/
<xsl:value-of select=
"RELFILE/@value"/>
426 <xsl:value-of select=
"$summary"/>
430 <OPTIONS>frame
</OPTIONS>
431 <TIMEMODIFIED>1094240775</TIMEMODIFIED>
435 <!-- Creates one module-text-staffinfo entry -->
436 <!-- TODO staff photo -->
437 <xsl:template name=
"module_text_staffinfo" >
438 <xsl:param name=
"mod_number">1.
</xsl:param>
440 <ID><xsl:value-of select=
"$mod_number"/></ID>
441 <MODTYPE>resource
</MODTYPE>
443 <xsl:value-of select=
"CONTACT/NAME/FORMALTITLE/@value"/><xsl:text> </xsl:text><xsl:value-of select=
"CONTACT/NAME/GIVEN/@value"/><xsl:text> </xsl:text><xsl:value-of select=
"CONTACT/NAME/FAMILY/@value"/>
446 <REFERENCE></REFERENCE>
448 <xsl:value-of select=
"CONTACT/NAME/FORMALTITLE/@value"/><xsl:text> </xsl:text><xsl:value-of select=
"CONTACT/NAME/GIVEN/@value"/><xsl:text> </xsl:text><xsl:value-of select=
"CONTACT/NAME/FAMILY/@value"/>
451 Title:
<xsl:value-of select=
"CONTACT/NAME/FORMALTITLE/@value"/>
452 Given Name:
<xsl:value-of select=
"CONTACT/NAME/GIVEN/@value"/>
453 Family Name:
<xsl:value-of select=
"CONTACT/NAME/FAMILY/@value"/>
454 Phone:
<xsl:value-of select=
"CONTACT/PHONE"/>
455 Office Hours:
<xsl:value-of select=
"CONTACT/OFFICE/HOURS"/>
456 Office Address:
<xsl:value-of select=
"CONTACT/OFFICE/ADDRESS"/>
457 Homepage:
<xsl:value-of select=
"HOMEPAGE/@value"/>
461 <TIMEMODIFIED>1094240775</TIMEMODIFIED>
465 <!-- Creates one module-text entry -->
466 <xsl:template name=
"module_text" >
467 <xsl:param name=
"mod_number">1.
</xsl:param>
469 <ID><xsl:value-of select=
"$mod_number"/></ID>
470 <MODTYPE>resource
</MODTYPE>
472 <xsl:value-of select=
"TITLE"/>
473 <!-- For announcements -->
474 <xsl:value-of select=
"TITLE/@value"/>
477 <REFERENCE></REFERENCE>
479 <xsl:value-of select=
"TITLE"/>
480 <!-- For announcements -->
481 <xsl:value-of select=
"TITLE/@value"/>
484 <xsl:value-of select=
"MAINDATA/TEXT"/>
485 <!-- For announcements -->
486 <xsl:value-of select=
"DESCRIPTION/TEXT"/>
490 <TIMEMODIFIED>1094240775</TIMEMODIFIED>
494 <!-- Creates one module-link entry -->
495 <xsl:template name=
"module_link" >
496 <xsl:param name=
"mod_number">1.
</xsl:param>
498 <ID><xsl:value-of select=
"$mod_number"/></ID>
499 <MODTYPE>resource
</MODTYPE>
501 <xsl:value-of select=
"URL/@value"/>
505 <xsl:value-of select=
"URL/@value"/>
508 <xsl:value-of select=
"TITLE/@value"/><br/
>
509 <xsl:value-of select=
"URL/@value"/>
512 <xsl:value-of select=
"DESCRIPTION/TEXT"/>
515 <OPTIONS>frame
</OPTIONS>
516 <TIMEMODIFIED>1094240775</TIMEMODIFIED>
520 <!-- ############# Modules Decisions ############# -->
522 <!-- Creates all module entries -->
523 <xsl:template name=
"modules" match=
"resource">
524 <!-- Create the News Forum Module -->
525 <xsl:call-template name=
"news_forum_mod">
526 <xsl:with-param name=
"mod_number" >1</xsl:with-param>
528 <!-- Create all other modules -->
529 <xsl:for-each select=
"//resource">
530 <xsl:variable name=
"mod_number" select=
"substring-after(@identifier,'res')"/>
531 <xsl:for-each select=
"document(concat('',@file))">
532 <xsl:apply-templates select=
"//FORUM">
533 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
534 </xsl:apply-templates>
535 <xsl:apply-templates select=
"//CONTENT">
536 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
537 </xsl:apply-templates>
538 <xsl:apply-templates select=
"//EXTERNALLINK">
539 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
540 </xsl:apply-templates>
541 <xsl:apply-templates select=
"//STAFFINFO">
542 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
543 </xsl:apply-templates>
549 <!-- Create an EXTERNALLINK module entry -->
550 <xsl:template match=
"EXTERNALLINK">
551 <xsl:param name=
"mod_number">1.
</xsl:param>
552 <!-- Every link module will have a label module describing it -->
553 <xsl:call-template name=
"module_label">
554 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
557 <xsl:call-template name=
"module_link">
558 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
563 <!-- Create a STAFFINFO module entry -->
564 <xsl:template match=
"STAFFINFO">
565 <xsl:param name=
"mod_number">1.
</xsl:param>
566 <!-- Every staffinfo module will have a label module describing it -->
567 <xsl:call-template name=
"module_text_staffinfo">
568 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
573 <!-- Create a CONTENT module entry -->
574 <xsl:template match=
"CONTENT">
575 <xsl:param name=
"mod_number">1.
</xsl:param>
578 <!-- Detected a file -->
579 <xsl:when test=
"FILES/FILEREF/RELFILE/@value != ''">
581 <!-- Every file module will have a label module describing it -->
582 <xsl:call-template name=
"module_label">
583 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
586 <xsl:variable name=
"summary" select=
"MAINDATA/TEXT"/>
588 <xsl:for-each select=
"FILES/FILEREF">
589 <xsl:call-template name=
"module_file">
590 <xsl:with-param name=
"mod_number" ><xsl:value-of select=
"$mod_number"/>0<xsl:value-of select=
"position()"/></xsl:with-param>
591 <xsl:with-param name=
"summary" ><xsl:value-of select=
"$summary"/></xsl:with-param>
597 <!-- Detected a folder -->
598 <xsl:when test=
"FLAGS/ISFOLDER/@value = 'true'">
600 <xsl:call-template name=
"module_label">
601 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
606 <!-- Detected text -->
607 <xsl:when test=
"MAINDATA/FLAGS/ISHTML/@value = 'true'">
609 <xsl:call-template name=
"module_text">
610 <xsl:with-param name=
"mod_number" select=
"$mod_number"/>
617 <xsl:value-of select=
"TITLE"/>
623 <!-- ############# Forum conversion ################# -->
625 <xsl:template match=
"FORUM">
626 <xsl:param name=
"mod_number">1.
</xsl:param>
628 <ID><xsl:value-of select=
"$mod_number"/></ID>
629 <MODTYPE>forum
</MODTYPE>
632 <xsl:value-of select=
"TITLE/@value"/>
635 <xsl:value-of select=
"DESCRIPTION/TEXT"/>
638 <ASSESSED>0</ASSESSED>
639 <ASSESSPUBLIC>0</ASSESSPUBLIC>
640 <ASSESSTIMESTART>0</ASSESSTIMESTART>
641 <ASSESSTIMEFINISH>0</ASSESSTIMEFINISH>
642 <MAXBYTES>0</MAXBYTES>
644 <FORCESUBSCRIBE>0</FORCESUBSCRIBE>
646 <RSSARTICLES>0</RSSARTICLES>
647 <TIMEMODIFIED></TIMEMODIFIED>
650 <xsl:for-each select="MESSAGETHREADS/MSG">
651 <xsl:variable name="discussion_id" select="position()"/>
654 <xsl:value-of select="$mod_number"/>0<xsl:value-of select="$discussion_id"/>
657 <xsl:value-of select="TITLE/@value"/>
659 <FIRSTPOST>2</FIRSTPOST>
661 <GROUPID>-1</GROUPID>
662 <ASSESSED>1</ASSESSED>
663 <TIMEMODIFIED>1094748430</TIMEMODIFIED>
664 <USERMODIFIED>1</USERMODIFIED>
666 <xsl:call-template name="MSG">
667 <xsl:with-param name="parent" select="0"/>
668 <xsl:with-param name="post_id">
669 <xsl:value-of select="$mod_number"/>0<xsl:value-of select="$discussion_id"/>0<xsl:value-of select="position()"/>
680 <xsl:template name=
"MSG" match=
"MSG">
681 <xsl:param name=
"parent" select=
"1"/>
682 <xsl:param name=
"post_id" select=
"1"/>
684 <ID><xsl:value-of select=
"$post_id"/></ID>
685 <PARENT> <xsl:value-of select=
"$parent"/></PARENT>
687 <CREATED>1094748430</CREATED>
688 <MODIFIED>1094748430</MODIFIED>
690 <SUBJECT><xsl:value-of select=
"TITLE/@value"/></SUBJECT>
691 <MESSAGE><xsl:value-of select=
"MESSAGETEXT"/></MESSAGE>
693 <ATTACHMENT></ATTACHMENT>
694 <TOTALSCORE>0</TOTALSCORE>
697 <xsl:for-each select=
"MSG">
698 <xsl:call-template name=
"MSG">
699 <xsl:with-param name=
"parent" select=
"$post_id"/>
700 <xsl:with-param name=
"post_id">
701 <xsl:value-of select=
"$post_id"/>0<xsl:value-of select=
"position()"/>
707 <xsl:template name=
"news_forum_section_mod" >
708 <xsl:param name=
"mod_number">1.
</xsl:param>
715 <INSTANCE>1</INSTANCE>
716 <ADDED>1094240775</ADDED>
721 <GROUPMODE>0</GROUPMODE>
725 <xsl:template name=
"news_forum_mod" >
726 <xsl:param name=
"mod_number">1.
</xsl:param>
728 <ID><xsl:value-of select=
"$mod_number"/></ID>
729 <MODTYPE>forum
</MODTYPE>
731 <NAME>News forum
</NAME>
732 <INTRO>General news and announcements
</INTRO>
734 <ASSESSED>0</ASSESSED>
735 <ASSESSPUBLIC>0</ASSESSPUBLIC>
736 <ASSESSTIMESTART>0</ASSESSTIMESTART>
737 <ASSESSTIMEFINISH>0</ASSESSTIMEFINISH>
738 <MAXBYTES>0</MAXBYTES>
740 <FORCESUBSCRIBE>0</FORCESUBSCRIBE>
742 <RSSARTICLES>0</RSSARTICLES>
743 <TIMEMODIFIED></TIMEMODIFIED>
745 <xsl:for-each select=
"//resource">
746 <xsl:variable name=
"m_number" select=
"substring-after(@identifier,'res')"/>
747 <xsl:variable name=
"discussion_id" select=
"position()"/>
748 <xsl:for-each select=
"document(concat('',@file))">
749 <xsl:if test=
"//ANNOUNCEMENT/TITLE/@value != ''">
750 <xsl:call-template name=
"ANNOUNCEMENT">
751 <xsl:with-param name=
"discussion_id" select=
"$discussion_id"/>
761 <!-- Create an ANNOUNCEMENT forum entry -->
762 <xsl:template name=
"ANNOUNCEMENT" >
763 <xsl:param name=
"discussion_id">1.
</xsl:param>
766 <xsl:value-of select=
"$discussion_id"/>
768 <NAME><xsl:value-of select=
"//ANNOUNCEMENT/TITLE/@value"/></NAME>
769 <FIRSTPOST><xsl:value-of select=
"$discussion_id"/></FIRSTPOST>
771 <GROUPID>-
1</GROUPID>
772 <ASSESSED>1</ASSESSED>
773 <TIMEMODIFIED>1094748430</TIMEMODIFIED>
774 <USERMODIFIED>1</USERMODIFIED>
777 <ID><xsl:value-of select=
"$discussion_id"/></ID>
780 <CREATED>1094748430</CREATED>
781 <MODIFIED>1094748430</MODIFIED>
783 <SUBJECT><xsl:value-of select=
"//ANNOUNCEMENT/TITLE/@value"/></SUBJECT>
784 <MESSAGE><xsl:value-of select=
"//ANNOUNCEMENT/DESCRIPTION/TEXT"/></MESSAGE>
786 <ATTACHMENT></ATTACHMENT>
787 <TOTALSCORE>0</TOTALSCORE>
793 <xsl:call-template name="MSG">
794 <xsl:with-param name="parent" select="0"/>
795 <xsl:with-param name="post_id">
796 <xsl:value-of select="$mod_number"/>0<xsl:value-of select="$discussion_id"/>0<xsl:value-of select="position()"/>