Jump to content

Search the Community

Showing results for tags 'Schema'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 15 results

  1. Any1 know if custom-made or that meaning my own made up schemas are any good? Are there any guidelines to follow? I have been considering if making a “customers” scheme - but not sure if and how 🕵️
  2. This is my first post and I'm not very good with Java. I'm trying to automatically create the following schema meta tag for my website: <meta itemprop="url" content="URLofthispage" /> The best I came up (pieced together from the internet) with is: <script>var addLink = function(url){ var link = document.createElement('meta'); link.setAttribute('itemprop', 'url'); link.content = window.location.href; document.getElementsByID('placehere')[0].appendChild(link); </script> And then <p id="placehere"><p> to place the meta tag in the correct location in my code. I have tried the same format also for <link itemprop="url" href="URLofthispage" /> which can also be used for the url tag. Any suggestions would be greatly appreciated.
  3. Hi all, please pardon me if i post to wrong section (it took me 3 days to even gain access this site). In your xsd tutorial, the Example 2 description is plain wrong, and it is confusing people. The faulty page is here: https://www.w3schools.com/xml/el_all.asp The error must be there for a long time, it even has its own post on stackoverflow https://stackoverflow.com/questions/5677154/how-do-i-make-items-optional-in-xsall Quote: "The example above indicates that the "firstname" and the "lastname" elements can appear in any order and each element CAN appear zero or one time!" To allow each subelement to be missing, the minOccurs attribute must be put to the subelements, not the xs:all itself. Please fix the embarassing error. :-)
  4. Hello, I'm a newbie developer and I'm just wondering if these forums would be an appropriate place to post the designs for a database I'm working on? I'm working on a site that people can use to keep track of their game collection. It's the first database I've designed entirely by myself and I'm looking for a place to post it so I can get some feedback on it. I see there's a thread for posting finished sites, is there a similar thread for databases? Thanks, Jay
  5. JamieY

    Help exporting xml

    Hello. Here is my problem that I really hope someone can help me solve. I work in the parts department at my company. On Monday, my boss is going to ask me to input a list of parts into a website that is going to take me about 4 hours to key in. It's about 400 or more lines of ten key that looks like this 1 123456-001 C14B23 5 123321-001-01 C1521 Repeat that with different numbers about 500 times. I found the website has an upload option so that I can import the parts. I know very little about XML. I got the company to send me an example upload file for the website. I have been playing with it for the last week and have had some success but mostly failure and I don't know why. I have been able to get a file to upload but that file will not save more than one record and will not upload more than one record. Most of the time when I try to export my file, I get an error from excel that says "Cannot save or export XML data. The XML maps in this workbook are not exportable. I took the example XML file they sent me as an example and opened it up in Visual Studio 2013. Then I went to the XML option and chose to save it as an XSD. I then open Excel, and choose the source button, click the XML maps button, load the xsd file that I just created from the XML file and then drag the fields on into the spreadsheet. This has both worked and failed for me. I don't know why it is that I have been able to get it to work and have not. My goal is to export the parts list from our database at work into an Excel sheet, import the XML template that I am trying to create and then copy and paste the parts. Export that as a parts list XML file and upload it to the website thereby saving me about 4 hours of typing. When I take the working example, import it into Excel, It automatically generates the map for me. I add a new line, and then try to export it and it won't. It fails. All the googling in the world has not taught me as to why. I don't understand the rules that Excel points to in order to fix this issue. I thought it had to do with repeating fields and that there needed to be 2 data sets but I can't figure out what that exactly means. I have attached my working example. Can someone please tell me how I can get this into a working spreadsheet template so that I can add rows for my import? Working-Example.xml
  6. That I am working on?: I am generating an XML schema that controls the inclusion of a logical expression in a program. There are logical operator (https://en.wikipedia.org/wiki/Logical_connective): - Unary (now only work with not) (force MaxOccurss=1 of LOGIC_VALUES) - Binary (and,or) (force MaxOccurss=Unbounded of LOGIC_VALUES) You can see the visual schema of code: Current code, which does not have the requested functionality <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified"> <xs:element name="LOGIC_EXPRESSION"> <xs:complexType> <xs:all> <xs:element name="LOGIC_OPERATOR" type="TYPE_LOGIC_OPERATOR"/> <xs:element ref="LOGIC_VALUES"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="LOGIC_VALUES"> <xs:complexType> <xs:choice> <xs:element name="LOGIC_VALUE" minOccurs="1" maxOccurs="unbounded"/> </xs:choice> </xs:complexType> </xs:element> <xs:simpleType name="TYPE_LOGIC_OPERATOR"> <xs:restriction base="xs:string"> <xs:enumeration value="and"/> <xs:enumeration value="or"/> <xs:enumeration value="not"/> </xs:restriction> </xs:simpleType> </xs:schema> What do I need? I need know: - If possible in the restriction of logic operator you can force the maxOccur of Logic_Values (dynamic change of maxoccurs to other element) - If it is possible to do, what should I use? Example of what I want You are writting the next XML code: <?xml version="1.0" encoding="UTF-8"?> <LOGIC_EXPRESSION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:/media/sf_Downloads/xml/Beta.xsd"> <LOGIC_OPERATOR>not</LOGIC_OPERATOR> <LOGIC_VALUES> <LOGIC_VALUE>Variable1</LOGIC_VALUE> <LOGIC_VALUE>Variable2</LOGIC_VALUE> </LOGIC_VALUES> </LOGIC_EXPRESSION> The XML schema should detect that it is a unary operator and you should receive an error. Thaks a million
  7. King_Ming

    xml to xsd

    Hi, I'm trying to create an xsd with restriction for the following but I can't seem to find an example of how to do it properly. Basically its a string element that has an attribute. What I'm trying to do is have restriction on both the Name and the Number. So for example, for Name, I want to only allow [a-t]*, and for number I want it to be 0 -100. Thanks in advance, ~Ming XML <Name Number="10">abcdeft</Name>
  8. HELPERS IN THE XML THREADS!!!!!!!
  9. targetNameSpace is to set a name space for the xml element in my schema? yes or no then an explanation comment please. a xmlns:xsi="uri" is to set the prefix for the xsi namespace and axsi:noNamespaceSchemaLocation="uri" is to set the location of my schema? yes or no, then a feedback comment please. is the targetNameSapce needed... I find it non-necessary to do when it can(by what I'm reading) define top level element and complex type(another question is that by definning type level complex type, do that also mean that type level complex when use in a element that is nested in another element gain the namespace too?). I find it unnecessary to use targetNameSapce when it doesn't cover all element being defined in the schema.informational feedback please anyone!
  10. Hi everybody, I'm having an XML exam tomorrow and there are still some points which I don't really understand. Appreciate if you could help me understand... Ok No. 1) Regarding the attached XML-Document: What is the result following Address? //md:annotationBody//md:contents[contains(@id, "1")] or //md:annotationBody//md:contents[contains(@id, "2")] My answer was: delivers each element of md:contents which has a 1 or 2 in its id. But the correct answer is: "true" - because with the 'or' the whole expression becomes a predicate. Can someone please explain this for me? I don't really understand the above explenation. No. 2) What is the result of following XQuery? xquery version "1.0";declare namespace xsi = "...."declare default element namespace "Anootation";element root { for %V1 in doc(*./MADCOW.xml*)//textContent[containts(.,"Annotation")] return element A {%V1/../@id}} The answer is: <root xmlns="Annotation"> <A id="1"/> <A id="2"/> </root> But why?? No. 3) Sketch a transformation which returns following information: name of author (author), Title (title) and last content of text (textContent): <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:md="Annotation"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <root> <xsl:apply-templates select="//md:metadata/md:author" /> <xsl:apply-templates select="//md:metadata/title" /> <xsl:apply-templates select="//md:textContent[last()]" /> </root> </xsl:template> <xsl:template match="md:author" > <autor> <xsl:value-of select="."/> </autor> </xsl:template> <xsl:template match="title" > <title> <xsl:value-of select="." /> </title> </xsl:template> <xsl:template match="md:textContent" > <content> <xsl:value-of select="." /> </content> </xsl:template></xsl:stylesheet> Isn't there a simpler way? I don't really understand what it does in line 8 to 14 I'll add other question when they occur. Thank you in advance for your support. Kind regards Mufasa
  11. Does anyone know of any tools available that will export an xsd's xpaths, elements and attributes as a table or excel spreadsheet?We often need to translate xsd's into a more readable format in order to provide them along with field descriptions and enumerated values and business rules to third party developers and product teams which requires a lot of manual copy/paste. There must be an easier way to do this, so I figured I would ask here. Maybe there is some magic tool that does something like this that I am not aware of. Thank you!
  12. In the xml schema data type --> date allows date as yyyy-mm-dd format by default.How can we modify it so that it accepts yyyy/mm/dd format style instead ?
  13. Hi, I quite enjoy learning with w3schools but one thing that frustrates me while trying to learn is that in the examples, if there is an outside source referenced in the code (the xml tutorial for example), it is not shown in the examples. The xml tutorials tell me that I can pull info from an xml document into an html document and it gives me the html code that references an xml document located somewhere on the w3schools servers. The problem I have is that I want to see the xml document, too, so I can see exactly how the two interact with each other. So, I suggest that if tutorials reference outside documents in the html code (or if a schema is referenced in an xml document, etc.) please show both documents so that it is easier to understand how they interact with each other. Thanks.
  14. I want to know, if there is a offical xsd schema for fo files?
  15. Hi there, last time I tried to use xpath unique simple type elements. In this case it works fine. <?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:complexType name="root"> <xs:choice minOccurs="1" maxOccurs="3"> <xs:element name="node1" type="xs:string"/> <xs:element name="node2" type="xs:string"/> <xs:element name="node3" type="xs:string"/> </xs:choice></xs:complexType><xs:element name="root" type="root"> <xs:unique name="choiceID"> <xs:selector xpath="."/> <xs:field xpath="node1"/> <xs:field xpath="node2"/> <xs:field xpath="node2"/> </xs:unique></xs:element></xs:schema> But is it also possible to use this functionality with elements which have a complex type?
×
×
  • Create New...