My family, books, photos, technology, language and some math משפחתי, ספרים, תמונות, טכנולוגיה, שפה, וקצת מתמטיקה
Saturday, July 7, 2007
XML Schema composition problems
I dived into the mysteries of XML Schema composition and found several things that are not so clear to me with the semantics of chains of xsd:include and xsd:inport, with referencing names across schema documents and things related to both.
See the thread that I started at xmlschema-dev mailing list: http://lists.w3.org/Archives/Public/xmlschema-dev/2007Jul/0001.html
I also saw a bug report related to some of my concerns reported as [Bug 4838] Chameleon behavior
I did not get a clear understanding of the issues that I raised.
I do understand that:
I also still do not understand the semantics of referencing names beyond the bounds of the same schema document as far as schema composition is involved. Should xsd:any and ref consider only names defined in the same schema document and in schema documents that are imported and included in it? Or perhaps should xsd:any and ref consider only names in the same schema document and in schema documents that import or include the schema document that they appear in? Or perhaps both? What exactly are the rules? I cannot make them out from the standard.
Not that it helps me, but it is still interesting to see the list of reported bugs to XML Schema when you look for "schema composition" in the bug tracking system: http://www.w3.org/Bugs/Public/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=XML+Schema&content=schema+composition
See the thread that I started at xmlschema-dev mailing list: http://lists.w3.org/Archives/Public/xmlschema-dev/2007Jul/0001.html
I also saw a bug report related to some of my concerns reported as [Bug 4838] Chameleon
I did not get a clear understanding of the issues that I raised.
I do understand that:
- circular dependencies is OK
I also still do not understand the semantics of referencing names beyond the bounds of the same schema document as far as schema composition is involved. Should xsd:any and ref consider only names defined in the same schema document and in schema documents that are imported and included in it? Or perhaps should xsd:any and ref consider only names in the same schema document and in schema documents that import or include the schema document that they appear in? Or perhaps both? What exactly are the rules? I cannot make them out from the standard.
Not that it helps me, but it is still interesting to see the list of reported bugs to XML Schema when you look for "schema composition" in the bug tracking system: http://www.w3.org/Bugs/Public/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=XML+Schema&content=schema+composition
לרכב או לרכוב?
רבים מתעייפים ממנהגי להעיר בכל פעם שאני שומע "לרכב על אופניים" או "לרכב על אופנוע" או "לרכב על סוסים" וכיוצא באלה...
אני תמיד רוטן ומתקן "לרכוב! לרכוב ולא לרכב! לרכוב!".
אחותי הבוקר טענה שאני טועה ואפילו האקדמיה ללשון טוענת שיש לומר לרכב. בדקתי ולא מצאתי. הכצעקתה?
רק לפני כמה שנים במהלך עבודת המאסטר שלי בה ייצגתי מורפולוגיה עברית בעזרת יחסים-רגולריים ומכונות מצבים השתדלתי להשכיל ולדייק בכל הנוגע לדקדוק בכלל ולמנגנון תצורת המילים בעברית בפרט. חזרתי לבדוק מה אומרים על זה במרכז הידע לעבוד העברית (שהיתה לי הזכות להקים את המעבדה שלו ולעבוד על כמה ממוצריו) והנה הממצאים שלי לפי ע"פ המנתח הצורני ויוצר המילים שהם העמידו ברשת האינטרנט (המרשתת!):
| המילה שהוקלדה: לרכוב | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| נמצאו 1 ניתוחים אפשריים | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ( 1 ) | רָכַב | פועל | פעל | (שם פועל) | (פריט בלקסיקון:7034) |
ראו: http://yeda.cs.technion.ac.il:8088/webViewAnalysis/processXMLString.jsp?input_text=%D7%9C%D7%A8%D7%9B%D7%95%D7%91
design patterns, design and patterns
I enjoyed reading the Rethinking Design Patterns post from the coding horros blog. It reminded me a short lightning talk by Mark Jason Dominus, which he gave at YAPC Israel 2003 (which I helped organize at Haifa university). It also reminded me to find the time to read A Pattern Language by Christopher Alexander (after I find the actual book... -- I'll probably order it from a bookstore) and see what the fuss is all about. I do remember reading Design Patterns by the Gang of Four (GOF), and remember that I did not understand what the book is about and why Design Patterns is a big deal that so many people find so cool and useful. Perhaps I need to re-read the book and possibly get a fresh new insight and opinion about it. Anyway... I just added Alexander's book to my shopping cart, and next time that I'll bulk order books I will probably order it too.
Thursday, July 5, 2007
Naymz
I signed up for a free Naymz account after finding Moshe Pontch on the web with it :-) Let's see what it can do...
Asking mirod XML::Twig questions on perlmonks
I am having some namespace related problems when using XML::Twig so once I realized that I don't know how to solve them I started posting a bug-report to its bug tracking system (see: http://rt.cpan.org/Public/Bug/Display.html?id=27617), but this was only to put the problem on the table. I then started a thread about it in israel.pm (see: http://perl.org.il/pipermail/perl/2007-July/008819.html and later posts on July 4th). Sadly, no-one on the list responded. I then tried asking on perlmonks (see: http://www.perlmonks.org/?node_id=624830)and was very happy to see that Michael Rodriguez, author of XML::Twig, took a shot to help me.
I'm now waiting for his kind help.
I'm now waiting for his kind help.
Sunday, July 1, 2007
Weekend
Thursday, June 28, 2007
Wednesday, June 27, 2007
some more interview questions
1. Consider a linked list where every node has one data field and one next field. The next field is used to point to the following node. You get a pointer to a node in such a list. You are required to delete the node. Please describe how you delete such a node. You are not allowed to change the structure of the nodes.
2. Consider a linked list where every node has one data field and one next field. You need to explain what operation do you need to do in order to be able to traverse such a list from head (a pointer to the first node of the list) to tail (a pointer to the last node of the list) and from tail to head. You are not allowed to change the structure of the nodes.
3. Explain the assembler language that you're familiar with and describe the architecture of the processor this assembler is for.
4. Write a Lex program that copies a file, replacing each non-empty sequence of white space by a single blank
5. Write a Lex program that copies a C program, replacing each instance of the keyword float by double
6. Consider the following C code:
7. Please give an object oriented description of the data structures required for an implementation of a jigsaw-puzzle game.
8. implement int strcmp(const char *s1, const char *s2); and int strncmp(const char *s1, const char *s2, size_t n); in the assembler language that you are familiar with.
9. Write a grammar (e.g., for YACC) for a calculator that supports the four basic arithmetic operations:
-+*/ and using the round brackets ( and ) for priorities.
10. Write a function void fizz_bazz(char* in, char* out, int l, int skew) that receives two strings, an input string and an output string. The memory for both strings is allocated a-priori and the length of both strings is l. You need to implement the function so that the output string will be as follows:
* every character c in the string in should be shifted skew positions upper or further.
* whenever a character in an odd position in the in array is being processed print fizz
* whenever a character in an even position in the in array is being processed print bazz
* whenever a character in a position that is divisible by 3 in the in array is being processed print boo
so for the following contents in the in array
bazzboofizzbazzfizzboobazz
2. Consider a linked list where every node has one data field and one next field. You need to explain what operation do you need to do in order to be able to traverse such a list from head (a pointer to the first node of the list) to tail (a pointer to the last node of the list) and from tail to head. You are not allowed to change the structure of the nodes.
3. Explain the assembler language that you're familiar with and describe the architecture of the processor this assembler is for.
4. Write a Lex program that copies a file, replacing each non-empty sequence of white space by a single blank
5. Write a Lex program that copies a C program, replacing each instance of the keyword float by double
6. Consider the following C code:
Suggest how to optimize this code.
int state;
int **transition_table;/* num_states x alphabeth_size*/
.
.
.
state = transition_table[state][input_char++];
7. Please give an object oriented description of the data structures required for an implementation of a jigsaw-puzzle game.
8. implement int strcmp(const char *s1, const char *s2); and int strncmp(const char *s1, const char *s2, size_t n); in the assembler language that you are familiar with.
9. Write a grammar (e.g., for YACC) for a calculator that supports the four basic arithmetic operations:
-+*/ and using the round brackets ( and ) for priorities.
10. Write a function void fizz_bazz(char* in, char* out, int l, int skew) that receives two strings, an input string and an output string. The memory for both strings is allocated a-priori and the length of both strings is l. You need to implement the function so that the output string will be as follows:
* every character c in the string in should be shifted skew positions upper or further.
* whenever a character in an odd position in the in array is being processed print fizz
* whenever a character in an even position in the in array is being processed print bazz
* whenever a character in a position that is divisible by 3 in the in array is being processed print boo
so for the following contents in the in array
ABxyzthe expected contents in the out array is
NOklmand the output on the standard output is expected to be
bazzboofizzbazzfizzboobazz
Tuesday, June 26, 2007
Don't waste your time reading EULA
In the coding horror blog (see:http://www.codinghorror.com/blog/archives/000892.html) I read a nice explanation why it does not make sense to waste your time reading EULAs.
Funny, I had a similar discussion at work with a colleague...
Funny, I had a similar discussion at work with a colleague...
Thursday, June 21, 2007
XML generation tools
Motivation:
Given an XML Schema (not a DTD) -- generate XML instances that are valid against the given schema.
This is very useful in creating tests suites, as it allows production of "positive" examples. For negative example generation, I am not familiar with any available tool other than untidy (which can only cause "not well formed" problems but also gives well formed examples by manipulating rules that give different representation to what is syntactically/semantically the same thing, such as adding/removing whitespaces).
Here is a list of available tools for this task:
* oxygen
* xml spy
* XML-XIG: XML Instance Generator (pronounced XML-ZIG)
* Stylus Studio
Anyone aware of alternative (better) tools?
Given an XML Schema (not a DTD) -- generate XML instances that are valid against the given schema.
This is very useful in creating tests suites, as it allows production of "positive" examples. For negative example generation, I am not familiar with any available tool other than untidy (which can only cause "not well formed" problems but also gives well formed examples by manipulating rules that give different representation to what is syntactically/semantically the same thing, such as adding/removing whitespaces).
Here is a list of available tools for this task:
* oxygen
* xml spy
* XML-XIG: XML Instance Generator (pronounced XML-ZIG)
* Stylus Studio
Anyone aware of alternative (better) tools?
Subscribe to:
Posts (Atom)

