Print

Print


Thanks Alex - yes, good point. I forgot about that technique!
I'll try it ...
-- 
Guy

-----Original Message-----
From: Blackboard/Courseinfo userslist [mailto:[log in to unmask]] On Behalf Of Alex Fraser
Sent: 01 December 2011 16:50
To: [log in to unmask]
Subject: Re: XML Snapshot: Empty XML tags in "manual mode"

Hi Guy,

Sorry to hear that!

I don't consider myself an expert on XML but whether whitespace nodes are considered significant or not is an option when using XSLT, ie "<x> </x>" may or may not be equivalent to "<x></x>" (which, as you wrote, is equivalent to "<x/>"). If the distinction is being lost somewhere in the process, it ought to be fixable...

Another simple thing to try would be "<x><![CDATA[ ]]></x>" instead. This may "survive" to be interpreted by Learn as a single space, avoiding the issue you describe below.

Kind regards,
Alex

Alex Fraser
e-Learning Technologist (Systems)
Learning Technology Team (LTT) | SITS & Learning Technology Lecture Centre LC016, Brunel University, Uxbridge, UB8 3PH, UK
t: +44 1895 265232 e: [log in to unmask]

Get updates on Brunel's Blackboard Learn implementation at the project blog: http://bbblearn.com/ 

-----Original Message-----
From: Blackboard/Courseinfo userslist [mailto:[log in to unmask]] On Behalf Of Guy Richard Heatley
Sent: 01 December 2011 12:20
To: [log in to unmask]
Subject: Re: XML Snapshot: Empty XML tags in "manual mode"

Having tested Alex's idea of using a single space ... it doesn't work :-(

This is actually due to the specification of XML which enforces the protocol that a tag enclosing only whitespace is seen as empty.

e.g.
<some_tag> </some_tag> (single whitespace) Is the same as <some_tag></some_tag> (empty tag, equivalent to: <some_tag /> )

The Oracle function that extracts the XML (in my sync process) knows this, and applies this rule to the XML thus removing the spaces I added!

I have resorted to escaping the space like this, to an HTML entity, and the ampersand to an XML entity: "<middle>&amp;nbsp; </middle>". (Nbsp = Non-breaking space)

This is OK providing the name only ever appeared on webpages which would render "&nbsp;" as a single space.
Anywhere else it would appear as "Bob &nbsp; Dobbs", but on a webpage correctly: "Bob Dobbs".
--
Guy


-----Original Message-----
From: Blackboard/Courseinfo userslist [mailto:[log in to unmask]] On Behalf Of Alex Fraser
Sent: 25 November 2011 15:52
To: [log in to unmask]
Subject: Re: XML Snapshot: Empty XML tags in "manual mode"

Hi Guy,

As we are working towards Snapshot integration, I recently read the "Advanced Integration and Data Management Guide" and noted the problem you describe as a potential issue. Referring to the flat file format there is the following paragraph (p46):

"Information that is not given (left blank) for fields that are included in the header is not changed during the operation. ... To clear a field, enter a single space."

The behaviour you are seeing with an XML feed file is consistent with this, so I would hope whitespace is preserved and a single space will have the effect for an XML feed file as it is documented to for a flat feed file.

I can't test it yet, but it seems like a good thing to try!

Hope this helps,
Alex

Alex Fraser
e-Learning Technologist (Systems)
Learning Technology Team (LTT) | SITS & Learning Technology Lecture Centre LC016, Brunel University, Uxbridge, UB8 3PH, UK
t: +44 1895 265232 e: [log in to unmask]

Get updates on Brunel's Blackboard Learn implementation at the project blog: http://bbblearn.com/ 


-----Original Message-----
From: Blackboard/Courseinfo userslist [mailto:[log in to unmask]] On Behalf Of Guy Richard Heatley
Sent: 25 November 2011 14:45
To: [log in to unmask]
Subject: XML Snapshot: Empty XML tags in "manual mode"

Hello!
Here at UCLan we use a daily XML file extracted from our student record system to synchronise Blackboard with current users and institution roles.

I run the XML that syncs the users in "manual mode" which means records are never deleted, just inserted or updated.
(To delete users I use a separate XML file that has been explicitly created, to avoid accidents!)

Anyway, I have noticed a strange "feature" of the XML sync process that becomes apparent if a  user permanently drops their middle name:-

If the student record system recorded that Bob Sigmund Dobbs had dropped his middle name the following XML would result:
The XML file produces an empty XML tag for that field e.g.
<first>Bob</first>
<middle />
<last>Dobbs</last>

Blackboard does not see the empty tag as an instruction to update this field to empty and performs no action. i.e. Bob still appears to have a middle name of Sigmund.

Does anyone know how to update a field to empty/null via the xml manual process?

I suppose this leads to the old database chestnut confusing a field that is definitely known to be empty, with a field for which we have no known data  (i.e. null).
Cheers!
--
Guy