Are there any XSD files to validate XML for the https://www.w3.org/TR/widgets/ namespace? - xsd

In the intelliJ suite, xsd validation is performed automatically and you get an error if a given schema is not found. I tried to find an xsd file for the w3c widgets namespace but i couldn't.
If there is no such thing, what is the best practice here? Just add a rule to each file to ignore the error? (that is not a good one imo)
Generate a schema automatically from the file? (but if i add something i need to regenerate it?)

Related

Generate DDIC structure from XSD?

I have a number of XSDs that are part of the enterprise definitions for several services at the client.
I would like to be able to take a single XSD and generate a DDIC structure from it (without the use of PI!)
Seeing as you can generate proxies directly from a WSDL, and this also generates structures and data elements from the XSD definitions inside the WSDL, there is obviously already ABAP code that does this.
But do you know what classes/function modules to use to achieve this? Perhaps there is a convenient utility function or class method that takes the XSD as input and generates the relevant DDIC objects?
Some background on why I need this:
Some of the services include variable sections that include a piece of XML containing the data for one of the enterprise XSD entities; I am hoping to have a DDIC representation of these, which I can fill at runtime and then convert to XML to include in the message.
There is a program on the system called SPROX_XSD2PROXY with which you can upload one or more XSD files which will generate proxy objects for you.
You also end up with a service consumer with a corresponding class and what looks like a dummy operation.
The program is fairly short; it uploads the files(s) to an XSTRING, then converts the XSD(s) to WSDL(s) and finally the WSDL(s) to proxy objects using methods of a class called CL_PROXY_TEST_UTILS.
However, the result is satisfactory as it does give me a structure I can work with. And by examining the contents of those methods, it may be possible to build a more fine-tuned tool if I need one.

Visual Studio 2008 Read values from XSD file

First post. I am trying to read the values of any XSD in Visual Basic. I want the application to read back values like complextypes, elements etc. I have been looking at MSXML2 but most examples include validation against a XML file. I only want to read XSD and get information. Will xml reader be able to read a XSD file? Any help be great.
It depends a lot on what you're trying to do with this information, therefore the prerequisites you need to have in place before doing it.
For all but really trivial tasks, I recommend the use of classes in System.Xml.Schema namespace, particularly start with XmlSchema and XmlSchemaSet. This would allow you to manipulate XSDs any way you want; it would also allow you to validate the schemas before using them, if it would prove to be a requirement.
For completeness, and for what I would call very simple tasks, you may also think that XSD is just XML, so then any XML processor should allow you to load an XSD and interogate it as needed.
All of the above, since you've mentioned VS2008, would be on Visual Basic.NET. If you're still on Visual Basic and need to rely on MSXML, then I would refer you to this article on using Visual Basic and SOM.

Validate BizTalk Schema in Visual Studio - "Custom component invocation failed"

Well, that error message doesn't help at all. I have a flat file schema that I cannot get working.
The XML is valid, but BizTalk can't work with it. Is there a way to enable verbose error logging when calling Validate Schema? Is there a better tool for validating/testing BizTalk schemas than Visual Studio?
I'm new to BizTalk and I'm stumped.
It sounds like something is wrong in your call to validate the schema. By any chance, did you forget to set the Input Instance Filename property?
There were two problems: Schemas built using the flat file wizard inexplicably default to Xml source. So it didn't know it wasn't dealing with .txt. Plus I had it set to expect 0 records.
Hi I had faced the same problem.
I had build a tool to convert TDS1 format schema to flat file schema. The xml schema was correct but it was not getting validated. Then i compared with my existing flat file schema and i found that child delimiter type was wrong. My tool was creating flat file schema with delimiter type set to hex for all the record info.
But ; is a character and not hex.
original record info attribute: child_delimiter_type="hex"
Changed record info attribute: child_delimiter_type="char"
So please check your delimiter type and other record info attributes as well.
Hope this will help....

Using JIBx to generate XSD from binding.xml

Is there a way to generate an XSD document automatically from the binding.xml used by JIBx? This is mainly to allow offline validation of the XML documents will be unmarshalled eventually.
I checked the JIBx homepage, it mentioned a tool called Schema Generator:
http://jibx.sourceforge.net/jibxtools/schema-example.html
but looks like the jibx-genschema.jar file is no longer part of the package anymore, as such I was wondering if there is any alternative
Thanks!
Here is the link to the original package.
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/codehaus/xfire/jibx/genschema/jibx-genschema.jar
Schema generator main class is org.jibx.binding.Compile. It is available in jibx-bind.jar.
This jar can be added to your project with maven dependency org.jibx:jibx-bind:1.2.3 (for example).
The SchemaGen tool has been included in the jibx-tools.jar file for some time. See the JiBX Binding Generator page for instructions on running tools in the jar, just substitute the target class org.jibx.schema.generator.SchemaGen to run the schema generator.

converting RELAX NG to XSD with trang while keeping external namespace elements (for use with JAXB)

I am using trang to convert a RELAX NG .rng file to an XML Schema .xsd file for use with JAXB. Is there a way to put attributes/elements in the .rng file and have them show up in the .xsd file? I have an external .xjb file that I use for JAXB settings, but there are some JAXB settings that are very closely coupled to the schema itself and it seems like it makes more sense to (somehow) put them in the .rng file rather than the .xjb file.
Any advice?
My opinion is that what you're doing now is the best way and you should keep your JAXB customizations separate from your RELAX NG schema. JAXB customizations in an XML Schema are ugly at best, distracting and confusing at worse. With RELAX NG, there's much less of a mapping and my guess is that you'll still need to put some of the customizations in a separate JAXB customization file, which means that your customizations will be in two different files.

Resources