i have the webage tvguide tvguideand i am having problem on how to start coding the xml for it just sample data
i can omit the advertising elements
XML Language should consist of:
a. XML Sample Data
b. DTD to define the sample data
c. Either an XML XSLT or and XSL-FO
d. CSS if you select XSLT
Your question is not very clear:
For generating xml from xsd you can use online tools like: http://xmlgrid.net/genXml.html
You can also use Eclipse, or any other IDE.
Why do you need DTD? XSD is like DTD only better.
XSLT helps transforming one XML to another, why do you need it?
How is CSS related?
Related
I tried lot of online tools to generate xml out of complex xsd file but things are not working. Is there any possibility to generate an xml out of complex xsd file in Groovy or any other third party applications to covert xsd into xml
I'm currently using Altova XMLSpy to convert a XML file using a XSLT 2.0 transformation sheet.
The problem I'm experiencing is that the source XML has some attributes defined in the schema as "fixed" and "qualified" so after the transformation they appear in the result XML. I know that's the default behaviour but the problem is those attributes have a namespace prefix that's not being copied so the result XML is not valid...
Actually I would like to disable the automatic generation of all "fixed" elements, is that possible?
Best Regards
Vlax
EDIT:
Here an example of the schema I'm using
PREMIS:
http://www.loc.gov/standards/premis/v2/premis.xsd
(notice the the xsl:import to http://www.loc.gov/standards/xlink/xlink.xsd)
Here the XML and XSLT to download (they are too long to publish as code):
https://dl.dropboxusercontent.com/u/11304697/Premis/Premis_Identity_Transformation.zip
Notice that in Identtiy_Transform_Result.xml in some element the fixed qualified attribute "xlink:type" is being output as type="simple", so no namespace prefix...
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.
I have two XSD files (source and target)... on what basis should I map these two files to get an XSLT? I know how MapForce helps in mapping but I worked with the sample project ..Now I wanted to know on what basis should I map these file that my client sent me..
I don't think there could be any general way to generate an XSLT given two XSD (if this is what your are after). The XSDs describe the structure of the XML files, but they don't say anything about what is the data they contain (their semantics if you will).
E.g.
<Customer>
<Name>ACME</Name>
<Address>9 Main Street, Anytown, USA</Address>
</Customer>
and
<Customer Name="ACME" City="Anytown" Country="USA" Address="9 Main Street"/>
are two XML describing more or less the same thing - but there is no way to know reading their XSD that the <Address> element in one correspond to three different attributes Address, City and Country in the other.
I am afraid you have to create the XSLT manually - and my suggestion would be to start from sample XML files, not the XSDs - much easier.
am afraid you have to create the XSLT manually - and my suggestion would be to start from sample XML files, not the XSDs - much easier.
Hello
I am generating Objective-C class files with Saxon via XSLT and in a comment header would like to include information as to which xsd was used for their creation. Is there any way I can access the current filename during an xslt transformation?
Would be great if anyone had an idea...thanks!
Assuming XSLT/XPath 2.0 or later you can use document-uri(/) http://www.w3.org/TR/xpath-functions/#func-document-uri to find the URI of the input document and if you only want the file name then you could use tokenize(document-uri(/), '/')[last()].