Search the Community

Showing results for tags 'Schema'.



More search options

  • 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

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 11 results

  1. 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
  2. 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>
  3. HELPERS IN THE XML THREADS!!!!!!!
  4. 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!
  5. 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
  6. 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!
  7. 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 ?
  8. 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.
  9. I want to know, if there is a offical xsd schema for fo files?
  10. 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?
  11. Hello all, I have following XML structure: <customlink xlink:href="anydoc.xml" xlink:title="a linked document">A document</customlink> How should an XML schema xsd-file look like that allows the xlink attributes? I've tried something like this: <complexType name="customlink" mixed="true"> <attribute name="xlink:href" /></complexType> But it doesn't work.