473,587 Members | 2,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

accessing documentation elements/unhandled attributes via the som

I have some information embedded in included schemas which I want to
access at run-time for the purposes of contructing a GUI (they will
support field labels and tool tips).

The options seem to be to store them as documentation/appinfo elements
within the included schema or as unhandled attributes.

Because the schemas are included it seems the items would have to be
accessed via the SOM (as opposed to retrieving the details via XPATH)
but I can't see anyway how to do this. I think unhandled attributes
means having to use SAX but I can't see how.

Can anyone help.
Jul 20 '05 #1
1 1974
Please note a GUI can become very complicated... I ended up using a separate
xml file to store GUI info, because if you start using xsl an xsd looks more
daunting. I use the xsd for things set by vb and an xml ref file for things
set by xsl.
You can load the xsd as a DOMDocument.
After writing the code below I realised you can actually select the
attributes directly using selectSingleNod e, which is what I now do for most
things. Selecting attributes directly means that instead of @name and @ref
you can just use @*="mynodename" .
_______________ _______________ _______________ _______________ _____________
Set m_XSDs = New MSXML2.XMLSchem aCache40
Set m_XSDDoc = New MSXML2.DOMDocum ent40
'sXSD is an XSD filename
m_XSDs.Add vbNullString, sXSD
Set m_XSD = m_XSDs.getSchem a(vbNullString)
With m_XSDDoc
.validateOnPars e = False
.async = False
.setProperty "SelectionLangu age", "XPath"
.setProperty "NewParser" , True
.Load sXSD
.setProperty "SelectionNames paces",
"xmlns:xs=""htt p://www.w3.org/2001/XMLSchema""
xmlns:sql=""urn :schemas-microsoft-com:mapping-schema"""
End With
_______________ _______________ _______________ _______________ _____________
sxsdID = "xs:annotat ion/xs:appinfo/xs:mds"
Set oXMLAnnotation = oXMLAnnotationP arent.selectSin gleNode(sxsdID)
If oXMLAnnotation Is Nothing Then

For Each oXMLAttribute In oXMLAnnotationP arent.Attribute s

If oXMLAttribute.N ame = "ref" Then
sxsdID = "/xs:schema/xs:element[@name=""" & oXMLAttribute.V alue
& """]"
Set oXMLAnnotationP arent =
m_XSDDoc.docume ntElement.selec tSingleNode(sxs dID)
Exit For
End If

Next

sxsdID = "xs:annotat ion/xs:appinfo/xs:mds"
Set oXMLAnnotation = oXMLAnnotationP arent.selectSin gleNode(sxsdID)
End If
If Not oXMLAnnotation Is Nothing Then

For Each oXMLAttribute In oXMLAnnotation. Attributes

Select Case oXMLAttribute.N ame
Case "type"

Select Case oXMLAttribute.T ext
Case "hidden"
nAttribs = nAttribs Or vbHidden
Case "readonly"
nAttribs = nAttribs Or vbReadOnly
End Select
End Select

Next

End If

regards,
Will
http://fileant.com

"wooks" <wo****@hotmail .com> wrote in message
news:88******** *************** ***@posting.goo gle.com...
I have some information embedded in included schemas which I want to
access at run-time for the purposes of contructing a GUI (they will
support field labels and tool tips).

The options seem to be to store them as documentation/appinfo elements
within the included schema or as unhandled attributes.

Because the schemas are included it seems the items would have to be
accessed via the SOM (as opposed to retrieving the details via XPATH)
but I can't see anyway how to do this. I think unhandled attributes
means having to use SAX but I can't see how.

Can anyone help.

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
2076
by: Christopher Benson-Manica | last post by:
When are named elements written with script accessible to script? <html><head><script type="text/javascript"> function ready() { alert( document.getElementsByName("div").length ); } </script></head> <body onload="ready()"> <script type="text/javascript"> document.open();
49
2953
by: Aidan | last post by:
I rely heavily on MSDN for documentation when it comes to HTML/DHTML/JavaScript/CSS but as a result I often have problems getting my stuff to work in Netscape/Mozilla/Firefox. I like the MSDN online documentation (http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/re ference/objects.asp) because it has complete lists of...
1
2970
by: Ole Hanson | last post by:
I would like to be able to generate documentation for a custom configuration file (xml) to enable future support engineers to understand applicable values to the various elements inside the configuration file. (see below for sample). Does any program exist (like NDoc) that is able to generate MSDN like documentation?
2
1189
by: Lisa | last post by:
I have to work with an existing xml where there is a root element and all other elements are children of the root (in other words there is no nesting or hierarchy), e.g. <myroot> <A>adata</A> <B>bdata</B> <C>cdata</C> <A>otheradata</A> </myroot>
6
5195
by: Alfred B. Thordarson | last post by:
I have a problem accessing a DLL using C#. I'm using C/FRONT with Navision's CFRONT.DLL, which contains the method: DBL_S32* DBL_NextKey(DBL_HTABLE hTable, DBL_S32* Key); typedef signed long int DBL_S32; In addition the documentation says that "hTable" is the "Handle to the table" and "Key" is "A table key or a NULL". Trying to access...
0
2254
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or updating the code-behind dll) accessing any aspx page in the application causes the application to run for the first time. Some of the initialization...
3
7654
by: Jim Lewis | last post by:
I have read several things that state accessing a Web Service through a Query String should work. However, when I try to execute http://localhost/webservice1/service1.asmx/HelloWorld I get the error below. Can I access a Web Service through a Query Sting. I need to send XML to a Flash movie using a Web Service. Thank You, Jim Lewis ...
7
2740
by: rein.petersen | last post by:
Hey All, I was wondering if there were a way for a script to access it's parent tag without having to use the document.all.tags method which doesn't necessarily identify it if there are more than 1 script tag in the document. eg. <html><body>
7
3800
by: Chuck Anderson | last post by:
I'm pretty much a JavaScript novice. I'm good at learning by example and changing those examples to suit my needs. That said .... ..... I have some select fields in a form I created for a database search that I am unable to figure out how to access. (The search is implemented in Php/MySQL.) The user enters search values for: name,...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.