schema

Valid XML, Valid schema. Where have I gone wrong?

Once upon a time I had a valid doctype and valid XML. I put the former on top of the latter, cntrl-s'd and behold: all was as all should be. Nowadays I have a valid schema (custom built for my still valid XML). I tried my same tried and true approach - but alas, no success. I get different errors with each different validator I use, and...

YAML Schema: Allowing different types

I'm trying to write a schema for a YAML file using Kwalify. I have a structure that can be a string, sequence, or mapping. Basically foo: bar foo: - bar - baz foo: - name: bar count: 1 foo: - name: bar count: 1 - baz are all valid. Under the foo key, you can have a string array of strings or maps with the key...

hi all, i am writing an xml to store data, can anyone tell about default type of attribute?

<xs:element name ="ID"> <xs:complexType> <xs:simpleContent> <xs:attribute name="OFFSET" type="U8" fixed="00"/> </xs:complexType> </xs:simpleContent> However i want to make OFFSET greater than 1024 .in that case i get error 1024 invalid value for atomiv'U8' i tried defining OFFSET in following manner <x...

Can I set a default schema for within a stored procedure?

I'm working on the next update for StackQL. One thing I want to do is have the ability to query over several releases. So when I loaded the October data, for example, I didn't delete the old September database. It's still out there. In fact, you can even still query it by including the database name like this: select top 10 * from...

Why are SQL fields lengths always (2^n)-1 unless less than 127?

A lot of Database schemas seem to follow the following standard: (2^n)-1 for large fields: varchar(511) varchar(255) varchar(127) ...then (2^n) for smaller ones varchar(64) varchar(32) varchar(16) varchar(8) I understand why numbers of (2^n)-1 are used, what I don't understand is why it is not necessary to continue the trend down ...

XML Schema: "use='required'" with default value

In an XML Schema, is it possible to have an element which has use='required' and a default value (e.g. <xs:attribute name="Version" type="U8" use="required" default="02"/>)? ...

Importing a schema LDIF and content LDIF on every startup of ApacheDS?

Hi guys! I want my embedded ApacheDS to start up with a fresh schema/content when I run my tests. I tried to import a LDIF with this lines: LdifFileLoader ldifLoader = new LdifFileLoader(service.getAdminSession(), "path/to/my/export.ldif"); ldifLoader.execute(); But now ApacheDS stores the information in a directory server-wo...

What is the proper name for this table schema?

We have a common database schema that we use for some tables in our system. Them main reason is that we are running a multi-tenant database so not all of our users require the same fields. However, I do not know what the 'proper' name for this type of schema is. Here's an example of what one of our tables might look like: ClientID |...

Cannot validate against multiple xsd schemas in C#

I wanna verify a digitally signed xml against its schema definition while this schema actually contains this tag <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd" id="schema"/> Then I tried to load schemas: XmlReaderSettings settings = new XmlReaderSettings(); settings.Schemas.Add(null...

MySQL: Can stored procedure information be extracted from the information schema?

Is it possible to retrieve stored procedure information like name, parameter nane/position/type from the Information Schema in MySQL or possible in some other way? ...

Complete XML Schema Validation

I am looking for a tool that will tell me all of the XML Schema validation failures. All the other tools I have looked at so just tell me the first couple, and then I have to fix those before it will tell me the next errors. I realize that some errors may be dependent on other nodes being in different orders, but things like data types...

Separation of logic and UI

I understand that I should keep my business logic and UI separate, but I don't know if what I'm doing now violates that rule. I'm designing my financial program's table structure. I've had a little trouble visualizing some parts, so I mocked up some screens to help me sort out what all will be needed and how things fit together. I rea...

Sourcing multiple xml docs from single xslt.

I am trying this and cannot seem to get it to work. Can someone take a look and see if I am missing something obvious. I am referencing the extra doc like this in test.xsl. <xsl:value-of select="document('/customercare/library/test/test1.xml')/resources/resource/name" /> This is the xml test1.xml. <resources> <resource> <n...

How to copy a table schema and constraints to a table of different database?

Hi all, I need an sql which will copy schema of a specified table to a table in different db. How to implement this? Please help. ...

Related posts: Get records by tags from different tables

Hi, I'm working on a news site. Like every news site there will be news, columns, videos and photo galleries. I'm planning to keep these different types of records in different tables but relate them with tags. Here is a simple schema: Tables: News, Videos, Galleries, Columns, Tags, Post_to_tags Post_to_tags: - tagid - postid - posttyp...

Getting Schema info from XML while validating in Java

Hi, I need to validate XML file against XML Schema so that the schema info is taken from the XML. I have XML document which defines its namespace. Like this: <?xml version="1.0" encoding="UTF-8"?> <myelement xmlns="mynamespace"> </myelement> The schema location is not in the document so I'd need to tell the validator where is the s...

SOAP UI: Can I add assertion to validate with local XML Schema file?

Hi all, I have created a Web Service (with Java, Axis). Depending on the content of the request, the response may have a different XSD. So, the WSDL only specifies that the response is of a generic XSD, and the responses comply to XSDs that import and extend the generic XSD. Unfortunately, the Schema assertion fail because the XSD spec...

how to resolve symfony doctrine:build-schema error (Unknown relation alias table_name)

how to resolve this symfony error : C:\inetpub\wwwroot\project\trunk\preprod\signup>php symfony doctrine:build-schema --trace >> doctrine generating yaml schema from database [sfException] Unknown relation alias table_name Exception trace: at C:\inetpub\wwwroot\project\trunk\preprod\signup\lib\vendor\symfony\lib\plugins\sfDoc...

Database schema design: What to do about unverified invitations?

I'm not quite sure how to approach this issue: I am creating a web application that has an invite only registration system. An admin user sends an email invitation to a user, the user clicks the link, and takes them to a page where they can create an account that has been linked to their email address. My initial idea was to insert a r...

How to create XML/XSD from SQL table with multiple tables

How to create XML/XSD from SQL table with multiple tables what I want to do is create an XML schema from a database (or database schema) This post has some interesting code Particularly DataSet results = new DataSet(); SqlCommand command = new SqlCommand("SELECT * FROM table", new SqlConnection(connectionString)); SqlDataAdapter sq...