Difference between revisions of "DOM load and save flow"

From COLLADA Public Wiki
Jump to: navigation, search
m (None)
(Undo revision 7089 by LLutz74 (talk))
 
Line 1: Line 1:
== kid carrier ==
+
'''Summary:''' The  [[COLLADA DOM]] includes utilities to read a [[COLLADA document]] and to write a new COLLADA document. This article describes the DOM's internal loading and saving flow.
  
You have recently stood a child, and great job have been in order! The good news is you're itchiness to get away from your home, reach the actual walk and even carry on trip. Among the most effective to transport your kids and make your hands totally free is to apply a young child company. Here's how to store.
+
==Loading==
  
 +
Calling <code>load</code> on the DAE object just checks whether an [[I/O plug-in]] and [[DOM database]] exist, creating default ones if they don’t (creates and instantiates an object of the default <code>IOPlugin</code> or <code>Database</code> class), then calls <code>read</code> in the I/O plug-in.
  
 +
The <code>libxml</code> I/O plug-in contains the following functions used while reading:
 +
* <code>read</code> calls a recursive function that reads the XML element hierarchy using <code>libxml</code>’s [http://en.wikipedia.org/wiki/Simple_API_for_XML SAX] parsing functionality.
 +
*<code> nextElement</code> calls the appropriate functions based on the XML SAX type currently being parsed, that is, an attribute, a value, or a new element.
 +
*<code>readAttributes</code> handles the white space delimiting of array values. It then calls the current element's <code>setAttribute</code> function. (See [[DOM meta system]] for information on what this does.) This has a nasty, but purposely designed, side effect that if the element is an array type, the particle is appended to the attribute type list and is not actually “set”.
 +
* <code>readValue</code> does the same as <code>readAttributes</code> except it doesn’t call <code>setAttribute</code> on the element but instead uses the meta value attribute (more in [[DOM meta system]]) to set the data.
  
The basic principles involving Little one Carriers
+
After the <code>libxml</code> plug-in reads and converts all of the XML document, it does the following:
  
 +
#Creates a daeDocument with the root being the root that was created on parse.
 +
#Creates all of the integration objects if they are used.
 +
#Resolves all elements that require resolution (more in [[DOM meta system]]).
 +
#Calls the [[DOM integration classes|integration object conversion functions]].
  
 +
==Saving==
  
Your first choice for a newborn can be an child provider. This can be a easy, frameless group that will snuggles baby right in entrance of you. Nearly all can take your baby and a few newborn items to some full fat as high as Twenty five as well as 30 lbs. Baby service providers are generally beautifully hassle-free for around-town use and also airline travel.
+
DAE <code>save</code> just checks whether the I/O plug-in and [[DOM database]] exist, creating them if they don’t. (If there is no database, then <code>save</code> will most certainly fail, but it creates it anyway.) Then it calls <code>write</code> in the I/O plug-in.
  
 +
The <code>libxml</code> I/O plug-in does the following while writing:
 +
* Uses <code>libxml2</code>’s SAX writer to write the COLLADA document.
 +
* Calls a recursive <code>write</code> function, <code>writeElement</code>, that writes each element and its child subtree.
 +
* Does some special-case handling if you have the option set to save the float data as a [[.raw file]]. ''((more on this later))''
 +
* If an element’s meta type is not flagged transparent then a new XML tag is created and the attributes are written by calling <code>writeAttribute</code>. (See [[DOM code generator]] for rules on what is marked transparent.)
 +
* <code>writeAttribute</code> does some processing to check whether an attribute should be written:
 +
** Does some special case handling so string types aren’t bound by the same size constraints that other types are.
 +
**Attributes that are required are always written. An element’s value is an attribute that is always considered required.
 +
**If the attribute is not required, it checks whether it was set. If not, then it is not written.
 +
**If the attribute is set then it is compared to the default value, if one was specified. If the attribute is the same as the default then it ignored. This always fails for array types (I think).
  
 +
==See also==
 +
*[[DOM guide: Working with documents]]
  
A young child carrier typically has a shape which is designed to have a bigger little one at the rear of a person. To employ a kid carrier, a youngster has to be capable of sitting up without assistance. The tiniest child right for a young child provider is all about Of sixteen lbs., that generally signifies a youngster concerning 6 as well as 7 a few months outdated. If uncertain about your little one's ability, check with your own doctor prior to venturing out. The greatest youngster proper to experience in a service provider is about Forty lbs., with a few types supporting better fat to accommodate equipment, way too.
+
{{DOM navigation}}
  
 
+
[[Category:COLLADA DOM|Load and save]]
 
 
Kid providers are a fantastic selection for journey, trekking and make use of about. Because the extra pounds as well as activity of your kid might cause you to definitely lose your balance, child providers are not suited to walking on loose stone, climbing, snow skiing, inline skateboarding, biking and other high-speed activities.
 
 
 
 
 
 
 
Evaluate Characteristics
 
 
 
 
 
 
 
 
 
 
 
The majority of little one carriers discuss simple capabilities such as adjustable shoulder and also midsection shoulder straps, flexible child funnel, any foldout kickstand and an exterior shape. Match is key. Megan Nelson, REI Washington products consultant, delivers these suggestions: "The suit can be like a new back pack, other than the weight voyages greater. Even so, the body weight is really not much of your issue if your youngster service provider suits you proper.In .
 
 
 
 
 
 
 
Here are several with the parameters to consider:
 
 
 
 
 
 
 
Headgear program: Here is the critical for adult comfort and ease. Many kid providers characteristic a good easy-to-adjust ladder headgear, similar to the kinds present in a lot of back packs. A child carrier's adjustability is actually measured with the body range (outlined underneath the Specifications tab in REI.net merchandise internet pages). Read more regarding <span class="plainlinks">[http://www.thepiggybackrider.com/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/">kid carrier</span>]</span> how for you to determine your core dimensions. Core alterations are simple: Should you be about the high facet, move the particular insides establishing increased for the rear (as well as, a high level reduced grown-up, move that to a lower environment). Several versions feature a preset headgear, which in turn limits flexibility, yet supply weight savings.
 
 
 
 
 
 
 
Kickstand: This particular tavern offers a dependable system for filling as well as unloading your youngster. Most may be physically lengthy and also rolled away on the packing situation using a straightforward pull. Some other designs include a fixed-position kickstand (which will save a certain amount of weight) or possibly a spring-loaded kickstand (which extends and folds up automatically-a nice function). These problems accomplish the same target, consequently personalized preference will be the deciding element below.
 
 
 
 
 
 
 
Framework: While mentioned earlier, frameless companies are intended simply for newborns and gear amassing around 30 lbs .. roughly. The majority of child providers attribute a frame regarding tubular metal. A couple of models use an aluminium stay regarding help, much like these found in internal-frame rucksacks, and could provide a backpack alternative.
 
 
 
 
 
 
 
Equipment: If you plan on using a kid carrier only occasionally, you may not be interested in all of the features in the luxurious versions. Nevertheless, if you are planning to move off-road or perhaps have a great deal of gear, think about versions using the following accessories:
 
 
 
 
 
 
 
Gear-storage capability, including easily-removed nappy bags or perhaps evening packs
 
 
 
More adjustability selections for a better in shape
 
 
 
Diaper-changing sleeping pad
 
 
 
Hydration-system match ups
 
 
 
Completely removable rain/sun cover (often offered independently)
 
 
 
Removable bug netting (generally marketed independently)
 
 
 
In shape a child Carrier for your requirements
 
 
 
 
 
 
 
First, adjust the kid provider to adjust to you. This can be a primary factor to your ease and comfort. When coming up with the initial modifications, use publications to bodyweight the rest instead of your kids.
 
 
 
 
 
 
 
 
 
 
 
Change the actual suspensions method to suit your core, so that the hipbelt is situated in your stylish our bones (not necessarily the stomach) as well as the band rest on the shoulders.
 
 
 
Tighten up your hipbelt therefore roughly 80% in the fat is on the sides.
 
 
 
Tighten the band therefore the little one service provider is sits firmly and the staying 20% approximately from the bodyweight is actually on your neck.
 
 
 
Adjust your sternum straps over the chest muscles so it doesn't interfere with your own inhaling and exhaling.
 
 
 
Match the kid Provider to Your Little one
 
 
 
 
 
 
 
Ahead of getting your son or daughter in the service provider, alter the height in the youngster seats. Guarantee the children's straps are generally relaxed as well as the kickstand is actually completely expanded.
 
 
 
 
 
 
 
Today set your kids within the service provider, and make sure his or her foot arrive through the knee open positions.
 
 
 
Gear as well as tighten up all shoulder straps, such as the hipbelt, tie, lower leg strap modifications and breast bone straps. Notice: Not all youngster providers have of these band choices.
 
 
 
Tense up the medial side data compresion straps, in case available.
 
 
 
Check to make certain the youngsters shoulder straps suit efficiently over his or her shoulder muscles understanding that the lower limb shoulder straps are comfortable.
 
 
 
Tips about Employing a Kid Provider
 
 
 
 
 
 
 
Training a great busy little one provider is just like hoisting much back pack (notice our pack-hoisting online video for guidelines). The first few times you do so, have someone assist you to don it the back again. Your actions: Elevate the little one service provider by the prime handles, wear the tie as well as belt the hipbelt. While detaching the company, undo the particular connectors as well as unbuckle the hipbelt. Getting the handle at the rear of your brain, provide your provider close to in your top, as well as understand the subsequent deal with that will help you arranged a child service provider on the ground.
 
 
 
 
 
 
 
Several extra tips:
 
 
 
 
 
 
 
Don't abandon your kids unattended as they or perhaps she's within the child provider.
 
 
 
Kids have a tendency to fall asleep in child service providers; occasionally look at your little one's situation and comfort.
 
 
 
Child carriers are certainly not effectively stable to be utilized as a seat, or should they ever be positioned on improved floors for instance a regular, desk or perhaps mattress.
 
 
 
Avoid using a youngster company if your shape or nails are ruined.
 
 
 
Be sure your child is protected through the temperature.
 
 
 
Contemplate sporting a hat which means your kid are unable to pick up hair
 

Latest revision as of 18:02, 26 September 2011

Summary: The COLLADA DOM includes utilities to read a COLLADA document and to write a new COLLADA document. This article describes the DOM's internal loading and saving flow.

Loading

Calling load on the DAE object just checks whether an I/O plug-in and DOM database exist, creating default ones if they don’t (creates and instantiates an object of the default IOPlugin or Database class), then calls read in the I/O plug-in.

The libxml I/O plug-in contains the following functions used while reading:

  • read calls a recursive function that reads the XML element hierarchy using libxml’s SAX parsing functionality.
  • nextElement calls the appropriate functions based on the XML SAX type currently being parsed, that is, an attribute, a value, or a new element.
  • readAttributes handles the white space delimiting of array values. It then calls the current element's setAttribute function. (See DOM meta system for information on what this does.) This has a nasty, but purposely designed, side effect that if the element is an array type, the particle is appended to the attribute type list and is not actually “set”.
  • readValue does the same as readAttributes except it doesn’t call setAttribute on the element but instead uses the meta value attribute (more in DOM meta system) to set the data.

After the libxml plug-in reads and converts all of the XML document, it does the following:

  1. Creates a daeDocument with the root being the root that was created on parse.
  2. Creates all of the integration objects if they are used.
  3. Resolves all elements that require resolution (more in DOM meta system).
  4. Calls the integration object conversion functions.

Saving

DAE save just checks whether the I/O plug-in and DOM database exist, creating them if they don’t. (If there is no database, then save will most certainly fail, but it creates it anyway.) Then it calls write in the I/O plug-in.

The libxml I/O plug-in does the following while writing:

  • Uses libxml2’s SAX writer to write the COLLADA document.
  • Calls a recursive write function, writeElement, that writes each element and its child subtree.
  • Does some special-case handling if you have the option set to save the float data as a .raw file. ((more on this later))
  • If an element’s meta type is not flagged transparent then a new XML tag is created and the attributes are written by calling writeAttribute. (See DOM code generator for rules on what is marked transparent.)
  • writeAttribute does some processing to check whether an attribute should be written:
    • Does some special case handling so string types aren’t bound by the same size constraints that other types are.
    • Attributes that are required are always written. An element’s value is an attribute that is always considered required.
    • If the attribute is not required, it checks whether it was set. If not, then it is not written.
    • If the attribute is set then it is compared to the default value, if one was specified. If the attribute is the same as the default then it ignored. This always fails for array types (I think).

See also


COLLADA DOM - Version 2.4 Historical Reference
List of main articles under the DOM portal.
User Guide chapters:  • Intro  • Architecture  • Setting up  • Working with documents  • Creating docs  • Importing docs  • Representing elements  • Working with elements  • Resolving URIs  • Resolving SIDs  • Using custom COLLADA data  • Integration templates  • Error handling

Systems:  • URI resolver  • Meta  • Load/save flow  • Runtime database  • Memory • StringRef  • Code generator
Additional information:  • What's new  • Backward compatibility  • Future work
Terminology categories:  • COLLADA  • DOM  • XML