Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScFlag for Zambia

asked on 

Safe Net in XML

Dear Experts!

Sorry to bother you again, in MS access we have a safe net called Optional Explicit , this helps us to ensure that the code we write is correct , now what about XML do we have any and how do we end statements like below:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
</customUI>

foe example I want to add 10 tabs, 10 groups  and 10 controls , how do I end the statements . By the way is it true that if we store the XML statements in a table , then each statement like the one above will look like below:

PK                        RibbonName                XmlRibbon
1                          MyTab                            <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
2                          Mytab                             </customUI>

etc


Kindly assist

Regards

Chris
Microsoft AccessXML

Avatar of undefined
Last Comment
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Avatar of ste5an
ste5an
Flag of Germany image

XML per se must be well-formed.  Well-formed mean the document is syntactically correct. You normally check this before processing XML in DOM mode or on the fly in stream mode. When it is not well-formed, processing stops and no data is used. The creator/source of the XML is responsible for well-formed XML.

Then there is also XML schema. A XML schema defines the structure and occurences of elements and data types. You use it to validate a well-formed XML file. When XML schema validation fails, the same from above applies: no further processing.

This means: Your table from above is nonsense, cause you would store invalid XML fragments per row. USysRibbons takes entire ribbon declarations, not fragments.

Further more, as it is about ribbons: See Ribbons for Access. Gunter's site is the best compendium and comes with some code samples and a practical ribbon builder.

But your implicit question answered: You would create and manipulate the UI XML in an appropriate XML editor. Many of them support XML validation for well-formed-ness and schema validation. You than only store a valid UI XML in the USysRibbons table.
Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc

ASKER

Ok well said

Does this syntax go in one raw in a system table????????

PK                        RibbonName                XmlRibbon
1                          MyTab                            <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon startFromScratch="true"/></customUI>


Or two rows in a system table ???????????????

PK                        RibbonName                XmlRibbon
1                          MyTab                            <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
2                          Mytab                             </customUI>
Avatar of ste5an
ste5an
Flag of Germany image

USysRibbons takes entire ribbon declarations, not fragments.
has already answered this.

USysRibbons is a table. Tables in a RDBMS take one row per entity.
ASKER CERTIFIED SOLUTION
Avatar of Fabrice Lambert
Fabrice Lambert
Flag of France image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Thank you so much you have lifted my day !
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo