Category: "Documentation"
Consider the following XML snippet:
<name type="first">Joe</name> <name type="last">Bloggs</name>
A common problem when working on an eXist project is that it gets serialized thusly:
JoeBloggs
That is, the whitespace gets discarded at some point along the line.
Previously, I've tried making adjustments to the XML directly (p xml:space="preserve") and adding processing instructions to XSL, like xsl:preserve-space. They are, at best, unreliable.
Martin and I worked through the various possible fixes, and discovered three ways to make this work:
1) when configuring your exist:serialize options, add 'indent=yes'
2) if handing something off to XSLT with transform:transform, send it a final directive 'indent=yes'
3) look for the string 'preserve-whitespace-mixed-content' in the main eXist config file ($existHOME/WEB-INF/config.xml) and change the value from no to yes. You'll need to re-index your collection before this will take effect.
We figure option 3 is the most practical way of addressing this as it doesn't add any overhead to your application.
So in tackling the Calydonian Boar Hunt issue, Greg and I had to figure out how to include an event in a character's description. It's a bit complicated so: EXAMPLE!
<person xml:id="eurytion_1">
<persName>Eurytion</persName>
<note type="description">A participant in the <listEvent>
<event corresp="events.xml#event_101">
<desc>Calydonian Boar Hunt</desc>
</event>
</listEvent>, killed unintentionally by <persName corresp="#peleus"
>Peleus</persName>.</note>
<age n="9"/>
<note><listPerson>
<personGrp/>
<relation name="father" active="#antigone_2"/>
</listPerson></note>
<sex value="1">male</sex>
</person>
So within the description add <listEvent> then <event (and the xml id of the event you want)> then <desc>(put the name of event here) and close all the tags.
~Simon
Instructions for using the Subversion Repository
------------------------------------------------
FIRST TIME:
------------------------------------------
1. Click on Terminal in launcher.
2. Type "mkdir mom" (without the quotes) and press return. This creates your working directory.
3. Type "cd mom" (without the quotes), then press return.
4. Type "svn checkout https://hcmc.uvic.ca/svn/mom/branches/dev/v3 ." and press return (don't forget the period).
It should ask you for a user name and password (sometimes password first, assuming a user name from your local logon; when that fails, it will ask for a user name, then a password). Use your netlink id and pw.
This will checkout a working copy from the repository to your hard drive. These are the files you'll work on every day.
BEFORE YOU START WORK EVERY DAY:
----------------------------------------
1. Click on Terminal in launcher.
2. Type "cd mom" (without the quotes), then press return.
3. Type "svn update" and press return.
This ensures that you have a completely updated local copy of all the files on your computer. Now you can work on your editing task.
AFTER YOU FINISH WORK EVERY DAY:
----------------------------------------
1. Click on Terminal in launcher.
2. Type "cd mom" (without the quotes), then press return.
3. Type "svn commit -m "Briefly describe the work you've done." (with the quotes), then press return.
Then your changes should be sent back to the server.
You may want to do a commit every few hours just to keep the server copies up to date.