Deriving a New Markup Language to Enhance Electrical Engineering
Total Page:16
File Type:pdf, Size:1020Kb
Deriving a new Markup Language from the Extensible Markup Language (XML) to enhance Electrical Engineering Applications إ ق ة ا ا ت ا! ا By Areej Yousef Abu Hadbah Student's number: 401210083 Supervisor Dr. Hebah. H. O. Nasereddin Computer Information Systems Department Faculty of Information Systems and Technology Middle East University This Partial Fulfillment is submitted as one of the Master’s Degree Requirements in Computer Information Systems (2014) II III Authorization Statement I'm authorizing the Middle East University to supply copies of my Thesis for Libraries, Establishments, Bodies, and Individuals upon their request. Name: Areej Yousef Abu Hadba. IV V DEDICATION The Almighty Allah says “And remembers! Your Lord caused to be declared (publicly): "If ye are grateful, I will add more (favors) unto you; But if ye show ingratitude, truly my punishment is terrible indeed.” (Surah Ibrahim, Verse 7) So all praise is for Allah, the exalted, for his favors that cannot be counted. I dedicate this work to my husband, my parents, my daughter, my family, my sisters, my relatives, my friends, and to all those who helped, supported and taught me. VI ACKNOWLEDGMENT My endless gratitude to my husband who is struggling to make my family life easier, my allegiance and sincerity are for you. My great thankfulness to my supervisor Dr. Hebah. H.O. Nasereddin for her supports, encouragements, giving help throughout this period, and for scrutinizing of my thesis draft. I dedicate this work to my parents, my daughters Yara and Lara, my sisters, brothers, relatives, friends, and all who have supported me. I would like to appreciate all the Information Technology Faculty Members of the Middle East University specially, Dr. Ahmad kyed and Dr. Maamoun Ahmed for their assistance which I had been received since I started this thesis. VII Table of Contents Deriving a new Markup Language From (XML) to enhance Electrical Engineering Applications….….….. I Authorization Statement………………………………………………….………………….…… III COMMITTEE DECISION……………………………………………………………………….. IV DEDICATION……………..…………………..………….……………………………………… V ACKNOWLEDGMENTS…………..……………………………………………………………. VI Table of Contents……………………………………………………………………………..… VII List of Tables.……………………...……………………………….……..……….……………... IX List of Figures.……………………...………………….…………………………………….……. X List of Abbreviations………………………………………………………………………...….. XIII XVII….…………………………………………………………………………………………ا ABSTRACT……………………………………………………………………………..….....XIX Chapter One: Introduction………………………………………………………...…...... 1 1.1 Overview………………………………………………………………..……...…... 1 1.2 Problem Statement………………………………………………………..………... 4 1.3 Contribution……………………………………………..…………………………. 5 1.4 Motivation……………………….. ……………………………………..…….…….5 1.5 Thesis Objectives……..……………………………………………….……..…….. 6 1.6 Thesis Structure……………..……………………………………………………... 6 VIII Chapter Two: Literature Survey and Related Works……………………………...….. 7 2.1 Overview………………………………………………………………………….....7 2.2 Related Works…………………………………….…………………………..……... 7 2.3 XML Technologies and Application….…………….….….……………………..... 18 2.4 Software Programs……………………………………………...………..………... 20 2.5 Web Site Application………………………………………………………….....…. 21 Chapter three: Designing the Proposed Model………..…………………………..………22 Overview……………………………………………………………………………...…….. 22 3.1 Proposed Model………………………….………………….………….................... 23 3.1 Creating a New Markup Language for Electrical Engineering……….…….……... 24 3.1.1 Classifications Tables of Electrical Symbols………………………...….…..……...24 3.1.2 Syntax and the XML Rules………………………………………………...…..…...28 3.2.3 Writing the XML Codes…..……….………...……………………….……….........31 3.2.4 XML Parsers……………...………………………………………………………...35 3.2.5 Connecting the Elements together……..…………..…………….….…….….….....36 3.2.6 XML Schema definition (XSD)…………………………………..……….….……..39 3.3 Designing the web application which supports the New Language….……...........42 3.3.1 Write the Descriptive Code in Text Box…………………..…….………………....43 3.3.2 Writing The Function and The Procedure………………..……………………...........50 Chapter Four Experimental Results………….…………….……………..……………...70 4.1 Compare and Results…………………………….……………………………….……... 70 IX 4.2 Draw The Same Circuit on Software Program and Proposed Model……………….80 4.3 Limitations…………………………………………………………………………..85 Chapter five: Conclusion and Future Work…………………….………………………..86 5.1 Overview……………………………………………..…………...……..……………….86 5.2 Conclusion……………………………………. .……………………...………………...86 5.3 Future Works…………...………………………………………..….…….……….........87 References…………………………………………………………………..………...…......88 APPENDICES……………………………………………………………………………....95 List of Tables Table (3.1): Wires Symbols………..………………………………………………………...24 Table (3.2): Switches Symbols and Relays Symbols….………….…..…………………….25 Table (3.3): Ground Symbols………………….…………………………………………… 26 Table (3.4): Resistors Symbols……………………..……………………………….………26 Table (3.5): Logic Gates Symbols………………………………………………….…...…..27 Table (4.1): Comparing the Based on the size Image….……………………………….......72 Table (4.2): Comparing the Based on the size image on Disk…………………………….74 Table (4.3): Comparing the Based on the Requirements…………..……………….………74 Table (4.4): Comparing Based on the Plate Form Independent……………………………75 Table (4.5): Comparing Based on the Edit on Circuit……………………………………...76 Table (4.6): Comparing Based on the Extract Information From Drawing………….....76 Table (4.7): Comparing Based on the Media Type………………………………………...77 X Table (4.8): Comparing Based on the Accuracy With Zoom……………………………...77 Table (4.9): Comparing Based on the Sharing and Exchange Information…….………....78 Table (4.10): Comparison Table…………………………….………………………………...79 List of Figures Figure (2.1): (MathML) Code…………………………………………………………………..9 Figure (2.2): Web Application Base (MathML) in Arabic…………………………..………... 9 Figure (2.3): Web Application Base (MathML) in English……...………………………...… 10 Figure (2.4): CML Code represents Molecules and Chemicals Information………..……… .12 Figure (2.5): CML Application Based on XML Language…......…….…………………...... 12 Figure (2.6): (WML) Code Based on XML……………………………………………..…... 14 Figure (2.7): The Difference Between Bitmap and Vector Images…………………………...15 Figure (2.8): (BML) Code……………………………………………………………….........16 Figure (2.9): X3D Code Based on XML…………………………………...……………........17 Figure (3.1): Proposed Model……………………...………………………………………… 23 Figure (3.2): Images are Used in the Proposed Model……………..……..………………..... 28 Figure (3.3): (BAT) Element has an Open and close tag…………..………………………… 29 Figure (3.4): Write Value in XML and HTML……....……………………………………..... 28 Figure (3.5): Error Code for Case Sensitive……..…………………………………………... 30 Figure (3.6): The Ordered tags in XML and HTML...………………………………………. 30 Figure (3.7): Root and Child Element……………………...……...……………………........ 31 Figure (3.8): Declaration the XML Document………………………………………………. 32 Figure (3.9): Create the Root Element (VOC)………….………………………………..….. 32 XI Figure (3.10): Create Child Element <Elements>………………………………………........ 33 Figure (3.11): Tree Structure for the XML Document…………………………………….… 34 Figure (3.12): The XML Tree for the Proposed Model…………………………………….... 35 Figure (3.13): The XML Code represents an Element has One Connection Point…..…….... 36 Figure (3.14): The XML Code represents an Element has Two Connection Points……….. ..37 Figure (3.15): The XML Code represents an Element has Three Connection Points…..….... 38 Figure (3.16): The XML Code represents an Element has Four Connection Points….......…. 38 Figure (3.17): The XML Schema Definition for Electrical Markup Language……………….. 40 Figure (3.18): (XSD) Elements………………………………………………………………. 40 Figure (3.19): Data Grid for XML Document…….……………………………………....…. 41 Figure (3.20): The Description of the Structure Code……………….………………..……... 44 Figure (3.21): Table represents the Numbers Position on the Screen………………………... 45 Figure (3.22): Equation for Finding (x, y) Point Automatically..………………….……….... 45 Figure (3.23): The (x, y) Point is Located in Position ………………………………………. 46 Figure: (3.24): The Figure Explains the Element Connection sides…………………………. 47 Figure: (3.. 25) Descriptive Code………………………………………….………………… 47 Figure (3.26): A Circuit Contains only Horizontal Elements…..………………………….… 48 Figure (3.27): An Equation is used to Locate the Point After Rotating the Element……..…. 49 Figure (3.28): The point Location After rotating the Element…..…………………..….……. 49 Figure (3.29): The Check Node Function…………………………………………………..... 50 Figure (3.30): The Check Node Error……………………………………………………....... 51 Figure (3.31): Loading Procedure of the XML File and Checking the Root tag…………….. 52 Figure (3.32): An Error has Happened Because of forgotten the Root tag by the User….….. 52 Figure (3.33): ID Checking Function……………………………………………………….... 53 Figure (3.34): A Page was Loading by Session…………….……...……………………...…. 54 XII Figure (3.35): Send data from (SVG) to draw the Page……...………….……………........... 54 Figure (3.36): Draw Circuit Function……..……………………………………………….... 55 Figure (3.37): Calls Shape Function…..…………….………………………………………. 56 Figure (3.38): Function to Draw Lines…………………………………………...………..... 57 Figure (3.39): Get Side Function…………………………………………………………..... 57 Figure (3.40): Help Page…………………………………………………………………….. 59 Figure (3.41): Search Page…………………………………………………………………... 60 Figure (3.42): Result for Search about (bat) word…………………………………………....61 Figure (3.43): Code to order the result search in table……...………………………………..62 Figure (3.44): Procedure to get Picture in cell (5)…………………………………………….62 Figure (3.45):