]> Eric van der Vlist vdv@dyomedea.com Examples from the Relax NG book. Chapter 3: First schema First schema 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish 1950-10-04 extroverted beagle Snoopy brought classical music to the Peanuts strip Schroeder 1951-05-30 Lucy 1952-03-03 bossy, crabby and selfish Between 2 and 6 character occurrences 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish Lucy 1952-03-03 bossy, crabby and selfish Chapter 5: Flattening our first schema foo bar Chapter 6: More patterns Explicit group Interleave Choice 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish Combining 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Patty Peppermint 1966-08-22 bold, brash and tomboyish Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Snoopy the Dog 1950-10-04 extroverted beagle the Dog Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish Whitespaces - as empty Whitespaces - as text foo foo Mixed content - verbose 0836217462 Being a <a href="http://dmoz.org/Recreation/Pets/Dogs/">Dog</a> Is a Full-Time <a href="http://dmoz.org/Business/Employment/Job_Search/">Job</a> Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish Mixed content - concise Interleaving an element in a group Interleaving two groups Mixed with fixed order 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy made her first apparition in a Peanuts stip on 1952-03-03, and the least we can say about her is that she is bossy, crabby and selfish. 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Born on 1952-03-03, Lucy is bossy, crabby and selfish. Chapter 7: Constraining text values Single value 0836217462 0836217463 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish Co-occurrence author character 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Peppermint Patty 1966-08-22 bold, brash and tomboyish Charles M Schulz 1922-11-26 2000-02-12 Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish Co-occurrence (step 2) author character Co-occurrence (step 3) author character Enumeration with default (token) type true false who knows? 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish Enumeration with native type (string) true false who knows? Enumeration with native type (token) true false who knows? Enumeration with native type and CR (string) true false who knows? Except single value 0836217462 Multiple exclusion true false Multiple exclusion (with choice) true false Multiple exclusion (with different types) true false 29: Lists (no restriction) 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 30: Lists (between one to four values) 31: Lists (exactly one value) 32: Lists (with enumeration) 0836217462 0345442695 0449220230 0449214044 0061075647 33: Lists (with different constraints) inches cm mm 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish Chapter 8: datatype libraries First schema with datatypes 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish First schema with datatypes and restriction on booleans 0 1 First schema with datatypes booleans needing to be "true" false 0836217462 Being a Dog Is a Full-Time Job Charles M Schulz 1922-11-26 2000-02-12 Peppermint Patty 1966-08-22 bold, brash and tomboyish Snoopy 1950-10-04 extroverted beagle Schroeder 1951-05-30 brought classical music to the Peanuts strip Lucy 1952-03-03 bossy, crabby and selfish First schema with datatypes booleans needing to be "true" (simplified) true First schema with datatypes and facets 16 [0-9]{9}[0-9x] 2 255 16 255 1900-01-01 2099-12-31 [0-9]{4}-[0-9]{2}-[0-9]{2} 1900-01-01 2099-12-31 [0-9]{4}-[0-9]{2}-[0-9]{2} 16 255 1900-01-01 2099-12-31 [0-9]{4}-[0-9]{2}-[0-9]{2} 255 First schema with datatypes, facets and ids [0-9]{9}[0-9x] 2 255 255 1900-01-01 2099-12-31 [0-9]{4}-[0-9]{2}-[0-9]{2} 1900-01-01 2099-12-31 [0-9]{4}-[0-9]{2}-[0-9]{2} 255 1900-01-01 2099-12-31 [0-9]{4}-[0-9]{2}-[0-9]{2} 255