just a linktip: code snippets for web developers
have a look
btw: i really recommend to subscribe to this blog - you can find lots of usefull informations ... have fun
Read more...
learn jquery with this video tutorials
this is the first part of the guided video tour about learning jquery from beginner to expert knowledge
this is just the first part of the tutorial list go to in the woods to watch the rest of the tuts
Read more...
another video about webdevelopment ... here you can have a look - how to work with css using firebug plugin
Using Firebug for CSS from kristarella on Vimeo.
Read more...
building webservices using netbeans
A nice video on how to create webservices using the nebeans ide
Read more...
great video
this is norton ... he's here to help!
here is another piece of great work from beautiful australia ...
Read more...
how to create a blogger widget - video tutorial
if you wonder how i choose the tiltle of the post "how to create the LyteBoxify widget" without actually explaining how to create the widget ... watch the tutorial ...
Read more...
Image via Wikipedia
Read more...
Image via Wikipediaif you've ever been curious about how to setup a test environment for mq-series ... here we go
1) download the trial version [link]
if you already have a working registration you can just download the file - otherwise you have to register
2) unzip the file and start the setup
3) if you see the following screen, you have to install eclipse 3.3 as well (fortunatelly it's part of the downloaded file - just use the button 'CD') ... after that step you have to press Refresh
4) go to Network Connections and choose 'NO'
5) choose your prefered language and start Websphere MQ Installation
6) the installation-wizard will guide you through the installation process (I've used the typical installation)
7) Websphere MQ Wizard will start after a while to guide you through the configuration
if you don't have any domain controllers in your network choose NO (default setting)
8) we don't click 'Setup the default Configuration' ... we will do the configuration in a second
9) start the Websphere MQ Explorer
10) right click Queue Managers - New - Queue Manager ...
11) choose a name for the Queue Manager and assign this Queue Manager as the default Queue Manager
no default transission queue
i've choosen SYSTEM.DEAD.LETTER.QUEUE but it's optional
that's it for now ... click Finish
if everything is correct you'll see something like this
side note: the default port of the Queue Manager is 1414
!!!Finished!!! ... next step will be a basic java app to test the configuration
Read more...
For some reason (i guess i was way too lazy) I messed up an exam at university. So this post will help me to know about the topics mentioned above.
XML is not just a standard for data-exchange. It's more like the root of a whole family of IT Standards f.e.
- Transformation of XML-Documents (XSLT, STX)
- Adressing of parts of the XML-Document (XPath)
- Connection of different XML-Ressources (XPointer, XLink, XInclude)
- Selection of Data from XML-Documents (XQuery)
- Data manipulation of XML-Documents (Update)
- Creation of XML based Forms (XForms)
- Definition of XML datastructure (XML Schema / XSD, DTD)
- Signature and encryption of XML-Nodes (XML-Signature, XML-Encryption)
- Formatted Output of a XML-Document (XSL-FO)
- Markup Language (XUL)
- Definition to call functions or methods of another system (XML-RPC)
- ...
- how can i use DTD to validate a XML-Document
- how can i use XSD (= XML Schema) to validate a XML-Document
- how can i use XPATH to get out the data i'm looking for
- how can i use XSLT to get a nice looking html out of a XML-Document
- [viq*]why should i know about such things[/viq]
Lets start with Question Nr. 1 "how can i use DTD to validate a XML-Document"
Document Type Definition (DTD) is one of several SGML and XML schema languages, and is also the term used to describe a document or portion thereof that is authored in the DTD language. A DTD is primarily used for the expression of a schema via a set of declarations that conform to a particular markup syntax and that describe a class, or type, of document, in terms of constraints on the structure of that document. A DTD may also declare constructs that are not always required to establish document structure, but that may affect the interpretation of some documents. XML documents are described using a subset of DTD which imposes a number of restrictions on the document's structure, as required per the XML standard (XML is in itself an application of SGML optimized for automated parsing).We all know how a standard XML-File looks like...
To validate this XML we create a DTD and link the XML File to this DTD File. To create those Files I use the Freeware called XMLPad.Basic bread Flour Yeast Water Salt Mix all ingredients together. Knead thoroughly. Cover with a cloth, and leave for one hour in warm room. Knead again. Place in a bread baking tin. Cover with a cloth, and leave for one hour in warm room. Bake in the oven at 180(degrees)C for 30 minutes.
Before i go on with the DTD-File we have to link the XML-File to the DTD
Lets create a simple dtd for that example before we look a little deeper into rules to validate
The most importand things to do right now: define Elements and Attributes for the XML-Document. We have to define Elements (name, ingredient, instructions), because there is no way of a valid XML-Document if there are more Elements in the XML File which are not mentioned in the DTD File.
This Elements-Definition should look likeThe Syntax of the Element-Tag should be self-explanatory, the only thing you have to consider is that we can have several incredient-tags (therefore we put a '+' right behind the tagname, we can also put a '*' behind to say that ther can be 0 or more incredient-tags or we put a '?' behind to tell the parser, that this attribute is optional).
The next Step is to define a Attribute-list (ATTLIST) for this element. This ATTLIST could look like ...
Now we have to continue with the next Element (name) - no attributes, so we just add an ELEMENT-Tag
PCDATA means Parsed Character Data. The only difference is, that in comparison to CDATA the parser will change special characters like the german Ö or Ü to its HTML counterpart.
Let's continue with the next Element (ingredient)
And finaly we have to define another Element (instructions) which has a sub Element (step), but not a single attribute:
That's just a basic example - to get further instructions on different ways to check your XML you could throw an eye on the DTD site of w3c, wikipedia, or the w3cschool-site.
Question 2: "how can i use XSD (= XML Schema) to validate a XML-Document"
As you probably already realized - DTD is kind of basic validation for XML-Documents. If you want to check something like the right Date format or do a bit more restrictions on values.
XSD provides a set of 19 primitive data types
- boolean
- string
- decimal
- double
- float
- anyURI
- QName
- hexBinary
- base64Binary
- duration
- date
- time
- dateTime
- gYear
- gYearMonth
- gMonth
- gMonthDay
- gDay
- and NOTATION
XML Schema, published as a W3C recommendation in May 2001, is one of several XML schema languages. It was the first separate schema language for XML to achieve Recommendation status by the W3C. Like all XML schema languages, XML Schema can be used to express a schema: a set of rules to which an XML document must conform in order to be considered 'valid' according to that schema. However, unlike most other schema languages, XML Schema was also designed with the intent that determination of a document's validity would produce a collection of information adhering to specific data types. Such a post-validation infoset can be useful in the development of XML document processing software, but the schema language's dependence on specific data types has provoked criticism.
In comparison to the DTD File the XSD File looks quite differentm, but you'll still be able to find the element and attribute tags in it.
Let's have a look, how a working XSD File could look like
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///E:/Daten/XmlPad%20Projects/XML%20via%20DTD/recipe-schema.xsd"Another interesting point is the sequence of the tags. For me it's just important to know that you have to define a element as a complex type with a sequence to add sub-elements.
Let's have a look on line 6 to 8. There you can find the sub-elements of the root element 'recipe'. Those sub-elements are defined a second time in the XSD File, therefore you put in a reference (attribute ref="...."). On line 7 we put in another new attribute maxOccurs="unboundet" which tells the parser, that this element has to be there once or many times.
Still in the complex-type tag, we can find the attributes (name, prep_time, cook_time) with their data definition (type=xs:string). Then the definition of the root element is finished.
Line 15: The definition of the element name (my personal favourite). You just put in the name and the type.
Line 16-26: Ingredients - We do have Attributes to define, so we put in the complex-type tag. In the shown example you'll find the tags xs:simpleContent and xs:extension. But because of the lack of time (and the fact, that i have no idea what they are doing exactly) i just deleted those tags (delete line 18, 19, 23, 24).
Read more...






