Given a XSD, and a XPath- ways to find the type of the XPath leaf element

Given a XSD, and an XPath (refering to an element in a XML document
satifying that XSD), is there an utility which return the "type" of the given XPath
element.
One approach just to traverse the XSD tree, generated by the XSDBuilder,
as per the elements specified in the XPath, until you find the type of the leaf
element in the XPath.
Is there an API/ utility which does this currently?
Thanks
PS:
For example given an XSD :
<element myTypeElem type="myType/>
<complexType name="myType">
<sequence>
<element firstElem type="integer"/>
<<element secondElem type="string"/>
</sequence>
</complexType>
Then the type of XPath : /myTypeElem/firstElem ---> integer
and type of XPath : /myTypeElem/secondElem ---> string

Unfortunately,
XPath is currently unaware of XML Schemas and as such cannot tell anything about the type of an element. XPath 2.0 is supposed to fix this in due time.
Cheers.
Rob

Similar Messages

  • Given a XSD, and an XPath - find type of leaf element

    Given a XSD, and an XPath (refering to an element in a XML document
    satifying that XSD), is there an utility which return the "type" of the given XPath
    element.
    One approach just to traverse the XSD tree, generated by the XSDBuilder,
    as per the elements specified in the XPath, until you find the type of the leaf
    element in the XPath.
    Is there an API/ utility which does this currently?
    Thanks
    PS:
    For example given an XSD :
    <element myTypeElem type="myType/>
    <complexType name="myType">
    <sequence>
    <element firstElem type="integer"/>
    <<element secondElem type="string"/>
    </sequence>
    </complexType>
    Then the type of XPath : /myTypeElem/firstElem ---> integer
    and type of XPath : /myTypeElem/secondElem ---> string

    Traverse the schema and retrieve the value of the type attribute for the specified XPATH element.

  • HT204370 I rented a movie from the Itunes store and started watching it, but my computer jammed part way through, and now i can't find the movie to continue playing it, where can i find it?

    I rented a movie from the Itunes store and started watching it, but my computer jammed part way through, and now i can't find the movie to continue playing it, where can i find it?

    Hi brett242424,
    Welcome to the Support Communities!
    The movie would be in your iTunes library, in the Movies application.  However, if the rental period has expired, you may need to contact the iTunes Store Support about your situation:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    http://support.apple.com/kb/HT1933?viewlocale=en_US
    Cheers,
    - Judy

  • Is there a way to find the list of PCs and iDevices connected to my Itunes Match?

    Is there a way to find the list of PCs and iDevices connected to my Itunes Match?

    Is there a way to find the list of PCs and iDevices connected to my Itunes Match?

  • I have purchased Lightroom 5 and had it installed but I had to replace my matchbook pro and now I can't find the activation key - is there a way I can get it emailed to me or how do I find it? Most other plugin's email out the activation key so you have a

    I have purchased Lightroom 5 and had it installed but I had to replace my matchbook pro and now I can't find the activation key - is there a way I can get it emailed to me or how do I find it? Most other plugin's email out the activation key so you have a copy but I have seen no way to get it.

    If you registered your Lightroom with Adobe after you installed it, you can log into your Adobe account and get your serial number from your account.

  • I just purchased the SX60 and have been trying to find the way to change the "startup image".

    I just purchased the SX60 and have been trying to find the way to change the "startup image". I have the SX40, Sx30 SX1 and all allow me to change the startup image and the sounds through MyCamera. When I opened MyCamera, it tells me that it won't work on my model. Does anyone know how to change the startup image? In the menu it gives me the choice to either have it on or off. Thanks so much!

    Looks like Canon has changed what they ship with the newer cameras. My SX50 came with a disc & no paper manual. Because of that I searched the Canon site (USA site) & found the program set you need to download (according to what it says). Now there are different versions based on your operating system so for my search I've chosen Win 8.0 & the program file recommended is
    File Description   Date Size
    Digital Camera Software 4.3 [Windows]
    09/16/14
    22.26 MB
    File Name: dcsw-4-3-0-2-9l.zi
    "A skill is developed through constant practice with a passion to improve, not bought."

  • I have an iPad1 which I have reset and am preparing to give to a kid.  I now find that I can't reinstall many apps as they now seem to require IOS 6 or greater.  This is IOS 5 and can't be upgraded.  Is there a way to find the older versions of the apps?

    I have an iPad1 which I have reset and am preparing to give to a kid.  I now find that I can't reinstall many apps as they now seem to require IOS 6 or greater.  This is IOS 5 and can't be upgraded.  Is there a way to find the older versions of the apps?

    One of these links may help:
    iOSSearch - search the iTunes store for compatible apps.
    Vintapps 3.1.3 - paid app.
    Apple Club - filter apps by iOS version.

  • Is there any way to find the serial number of an ipod touch that is no hooked up to the computer?  It was stolen and we need the number to give to the police.

    Is there any way to find the serial number of an ipod touch that is no hooked up to the computer?  It was stolen and we need the number to give to the police.

    If the product was registered, the serial number should be here, under My Products:
    https://supportprofile.apple.com/MySupportProfile.do

  • Is there is any way to find the data transfer from client to Configuration Manager for health monitoring and hardware Inventory

    Hi
    Can Configuration Manager provide a way to find the data transfer from client to Configuration Manager for health monitoring and hardware Inventory. How can I know what amount of data is consumed during that process

    Place archive_reports.sms in %systemroot%\ccm\inventory\temp\ for both 64-bit and 32-bit computers.
    There are two situations where you can use this depending on the type of client:
    1. To keep inventory reports on a client (that is not an MP), create the following file:
    %systemroot%\ccm\inventory\temp\archive_reports.sms
    2. To keep inventory reports on a MP (that is also a client), create the following file:
    <x>:\sms_ccm\inventory\temp\archive_reports.sms
    The XML file will be saved in the inventory\temp folder.
    More information on the above here: http://blogs.technet.com/b/configurationmgr/archive/2012/09/17/controlling-configuration-manager-2012-using-hidden-files.aspx

  • HT4061 Is there another way to find the serial number with only your apple ID and password because apparently I never backed up my iPhone 5?

    Is there another way to find the serial number with only your ID and password because apparently I never backed up my device on my computer?

    If you registered it with Apple, you could try:
    supportprofile.apple.com
    Use your Apple ID and password to log in

  • HT1391 Is there a way to find the serial number for a devise from ITunes? I need it to try and track it as it was stolen

    Is there a way to find the serial number for a devise from Itunes? I need the number for a device that was stolen.

    How to find serial number

  • Is there a way to find the serial number in these files so that I can reinstall the full version?

    I had to restore from backup to a new hard drive, and only have part of my Adobe Photoshop installation. Is there a way to find the serial number in these files so that I can reinstall the full version?  I have only part of the documentation so this is the best way I see to get the full version back.

    Hello brad,
    you did purchase your product from these firms like Amazon, so you didn't get a serial number, only a code with which you can request a serial number from Adobe. Please have a look at http://helpx.adobe.com/x-productkb/global/find-serial-number.html. (Start here: How did you purchase your product?)
    The following part, so I just see at least, ceased to exist on my Adobe website, everything takes place in the link from above. I leave it as an info yet, it might still fit for you. For this purpose, please click your way through to your Adobe Store and find the button "Get Serial Number". Fill in the form and after a while you will get the real serial number.
    Additionally you should have a look at Adobe's database, to see what's stored/saved about your accounts. Here you will find general infos about your Adobe Account.
    On the other hand, if necessary and for further questions click through http://helpx.adobe.com/contact.html and if "open" please use the chat, I for may part had the best experiences. I quote from Adobe's employee Preran: The chat button is activated as soon as there is an agent available to help.
    Hans-Günter

  • I have files that freeze my programs whenever I try to open ANY file. Is there a way to find the exact files causing the crash?

    I have files that are freezing my programs (adobe; after effect and photoshop, as well as maxon cinema 4d). Whenever I try to import ANY file from within the program it doen't even let me select the file I need before freezing. I have moved all files off my desktop and into my dropbox, and it now allows me to import files/search for files on the desktop but NOT dropbox, once I go to dropbox it freezes again. I am assuming there are files within dropbox now that are crashing my programs. The problem is I have a lot of files in there and would like to remove the corrupt ones so that I can use my programs without freezing. Is there a way to find the exact files causing the crash?
    This has happened a couple of times and each time I have to move all my files off my desktop, so there must be a type of file doing this, I just don't know what files they are.
    Mac Book Pro 15" running OSX 10.9
    Processor  2.3 GHz Intel Core i7
    Memory  16 GB 1600 MHz DDR3
    Graphics  Intel Iris Pro 1024 MB
    ANY help would be greatly appreciated! It is making it really hard to get work done. THANKS!

    This error sounds to me like you have/had BootCamp Windows installed and then removed, posible ?
    If so (and even if not so), try restating your MBA while holding down the alt/option-key until you get to the Boot Selection Screen.
    Choose to boot OSX.
    Once in OSX go to System Preferences then Startup Volume and set your OSX to be the default.
    Hope it helps
    Stefan

  • My mac book wont recognize my ipod. My Ipod will make the initial connected sound saying its charging but otherwise theres no way of finding the Ipod anywhere on the computer or Itunes.

    My mac book wont recognize my ipod. My Ipod will make the initial connected sound saying its charging but otherwise theres no way of finding the Ipod anywhere on the computer or Itunes. Please help with anyway I can get the Ipod recognized so I can download music from Itunes to my Ipod. Thanks in advance.

    Hello xerxes.nashion,
    It sounds like your iPod is not recognized by iTunes or your MacBook Pro.  I recommend following the steps in the article below for an issue like this:
    iPod not recognized in iTunes and Mac desktop
    http://support.apple.com/kb/TS1410
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Fast way to find the number of non-zero terms in an array or image

    I am trying to use the Standard Deviation PtbyPt Vi.  It takes in a series of points, can be reset when beginning the calculation.  There is also an input for sample size.  I am calculating some statistics on an array...and would only  to include like the non-zero elements that are  in the sample. 
    Is there a quick way to look at an array and find the number of non-zero elements?
    Thanks.
    Solved!
    Go to Solution.

    GerdW wrote:
    - for big arrays this may lead to "out of memory" problems because of creation of data copies
    Here's a quick rundown on memory allocations based on the algorithm.
    (case 1&3)
    If you do the "!=0, ?1:0, I32, sum" shuffle, each step needs to allocate a new array, so if the input array is DBL and uses N amount of memory, we need 7N/8 more memory.
    (Total of 15N/8, or 13N/8 if we don't need the I32, but in this case the array are too small to worry about anything )
    The nice thing is that it works for any array dimensionality (1D, 2D, 5D, etc...)
    (Case 2&5)
    If you do the summing in a shift register, No additional array memory is needed. Unfortunately, the code needs to be changed by adding an extra FOR loop for each dimension (see case 5 for 2D inputs).
    (Case 4)
    If we reshape the N-D array to a 1D array, we need to create a second copy, so the memory usage is about twice. This also works for any dimension.
    In real life, and if memory is a potential issue, you should always do some benchmarks.
    Often, the issues are more complex, so this is just a quick summary.
    Message Edited by altenbach on 10-23-2008 11:59 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    CountNonZero.PNG ‏29 KB

Maybe you are looking for

  • Printing in Classic

    I have a G4/350 w/ OS10.3.9 and an Epson CX6400 printer/Scanner. I have no problem printing in OS 10 or in OS 9. However when trying to print an OS 9 app in Classic I can only print to a PDF and then print from that. Also, I cannot Scan in Classic. T

  • Best memory card for video (curve 8330)

    Hi everyone. I'm new to this forum. I have a curve 8330 and I want to start taking video with it. What sort of memory card do I need? And how much video will each gb of memory hold? Thanks! Solved! Go to Solution.

  • Why does Adobe Reader 11.2.1 for Android keep crashing?

    I am using a Samsung Galaxy Note 10.1 tablet and have successfully been reading, highlighting and annotating my pdf course books for 6 months but the latest update keeps crashing. I have precious study time on my journey to work and have now lost ove

  • Start a new Document with Millimeters

    Hi there, I am new to Illustratror Scripting. I changed a Script from William Ngan, http://www.metaphorical.net and http://forums.adobe.com/message/3813716?tstart=1 It saves EPS-files instead of AI-Files. But the Units are still in PT. I want them to

  • Can't download firefox [on iPad]

    == Issue == I have another kind of problem with Firefox == Description == Try to download firefox but get error safari will not download file is there something that needs to be changed ? == This happened == Just once or twice == Trying to download f