Creating External Files

In this lesson of the Courseware tutorial, you will learn...
  1. About the directory structure.
  2. To create external files.
  3. To mark up sections to be emphasized in the text.
  4. To mark up sections to be omitted in the text.
  5. To create the Setup directory.

The WCWC Directory Structure

As an author of Webucator courses, you should start with a directory structure that looks like this: Directory Structure

Creating External Files

Any text files can be references from a lesson file. They just need to be marked up with the very simple Webucator Courseware XML language.

You should start by writing the Demo, Exercise, and Solution files in whatever tool and format you would normally use. After you have tested them and feel comfortable that all are working as they should, you should open them in an XML editor and mark them up so that they are valid according to the XML Schema shown below:

Code Sample: ExternalFiles/Demos/ExternalFile.xsd

<xs:schema xmlns="http://www.webucator.com/Schemas/Courseware" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.webucator.com/Schemas/Courseware" elementFormDefault="qualified">
 <xs:element name="File">
  <xs:complexType mixed="true">
   <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Omit" type="xs:string"/>
    <xs:element name="Em" type="xs:string"/>
   </xs:choice>
  </xs:complexType>
 </xs:element>
</xs:schema>

The first thing to do is to wrap the whole file in <cw:File> tags as shown below:

Syntax
<cw:File xmlns:cw="http://www.webucator.com/Schemas/Courseware" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.webucator.com/Schemas/Courseware http://www.webucatormanuals.com/WCWC/Authoring/ExternalFile.xsd"><![CDATA[Your code starts here. Notice how it bumps right against the beginning of the CDATA section

Here's some more code.

This code is what you want to emphasize in the manual.

This is a lot of extra code that will remain in the
file but should be omitted from the manual.

This is the end of the file. Notice how it bumps right up against the close of the CDATA section.]]>
</cw:File>
Code Explanation

Things to notice:

  1. Namespace: http://www.webucator.com/Schemas/Courseware - qualifier is "cw".
  2. The file must be well-formed XML. Because many code files include characters that will make the file poorly formed, you should always wrap all text in CDATA sections.
  3. http://www.webucatormanuals.com/WCWC/Authoring/ExternalFile.xsd is a URL pointing to the schema, so that the file can easily be validated by any XML authoring tool.

Emphazing Content

To draw attention to content in the manual, wrap it in <cw:Em> tags as shown below:

Syntax
<cw:File xmlns:cw="http://www.webucator.com/Schemas/Courseware" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.webucator.com/Schemas/Courseware http://www.webucatormanuals.com/WCWC/Authoring/ExternalFile.xsd"><![CDATA[Your code starts here. Notice how it bumps right against the beginning of the CDATA section

Here's some more code.

]]><cw:Em><![CDATA[This code is what you want to emphasize in the manual.]]></cw:Em><![CDATA[

This is a lot of extra code that will remain in the
file but should be omitted from the manual.

This is the end of the file. Notice how it bumps right up against the close of the CDATA section.]]>
</cw:File>

Omitting Content

To omit content in the manual, wrap it in <cw:Omit> tags as shown below:

Syntax
<cw:File xmlns:cw="http://www.webucator.com/Schemas/Courseware" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.webucator.com/Schemas/Courseware http://www.webucatormanuals.com/WCWC/Authoring/ExternalFile.xsd"><![CDATA[Your code starts here. Notice how it bumps right against the beginning of the CDATA section

Here's some more code.

]]><cw:Em><![CDATA[This code is what you want to emphasize in the manual.]]></cw:Em><![CDATA[]]><cw:Omit><![CDATA[

This is a lot of extra code that will remain in the
file but should be omitted from the manual.

]]></cw:Omit><![CDATA[This is the end of the file. Notice how it bumps right up against the close of the CDATA section.]]
</cw:File>

Files that Don't Get Validated

Files with the following extensions are copied as is to the output folder:

  • gif
  • jpg
  • png
  • mdb
  • zip
  • pdf
  • txt
  • class
  • dll
  • pdb
  • cache
  • sln
  • suo

All other files in the ClassFiles directory will be transformed, so they must be marked up as valid WCCW files.

Creating External Files Conclusion

In this lesson of the Courseware tutorial, you have learned to create and mark up external files. That's all there is to it.

To continue to learn Courseware go to the top of this page and click on the next lesson in this Courseware Tutorial's Table of Contents.

Use of this website implies agreement to the following:

Copyright Information

All pages and graphics on this Web site are the property of Webucator, Inc. unless otherwise specified.

None of the content on this website may be redistributed or reproduced in any way, shape, or form without written permission from Webucator, Inc.

No Printing or saving of web pages

This content may not be printed or saved. It is for online use only.


Linking to this website

You may link to any of the pages on this website; however, you may not include the content in a frame or iframe without written permission from Webucator, Inc.


Warranties

This website is provided without warranty of any kind. There are no guarantees that use of the site will not be subject to interruptions. All direct or indirect risk related to use of the site is borne entirely by the user. All code and explanations provided on this site are provided without warranties to correctness, performance, fitness, merchantability, and/or any other warranty (whether expressed or implied).

For individual private use only

You agree not to use this online manual to deliver or receive training. If you are delivering or attending a class that is making use of this online manual, you are in violation of our terms of service. Please report any abuse to courseware@webucator.com. If you would like to deliver or receive training using this manual, please fill out the form at http://www.webucator.com/Contact.cfm.