Implemented XML Formatter and simplified structure of XML tools #229
@@ -1,33 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<library>
 | 
			
		||||
    <libraryName>City library</libraryName>
 | 
			
		||||
    <libraryID>345123</libraryID>
 | 
			
		||||
    <readerList>
 | 
			
		||||
        <person>
 | 
			
		||||
            <readerID>7321</readerID>
 | 
			
		||||
            <name>Adam</name>
 | 
			
		||||
            <surname>Choke</surname>
 | 
			
		||||
        </person>
 | 
			
		||||
        <person>
 | 
			
		||||
            <readerID>5123</readerID>
 | 
			
		||||
            <name>Lauren</name>
 | 
			
		||||
            <surname>Wong</surname>
 | 
			
		||||
        </person>
 | 
			
		||||
    </readerList>
 | 
			
		||||
    <bookList>
 | 
			
		||||
        <book>
 | 
			
		||||
            <bookID>6422</bookID>
 | 
			
		||||
            <title>Harry Potter</title>
 | 
			
		||||
            <readerID>7542</readerID>
 | 
			
		||||
        </book>
 | 
			
		||||
        <book>
 | 
			
		||||
            <bookID>1234</bookID>
 | 
			
		||||
            <title>Macbeth</title>
 | 
			
		||||
            <readerID>5123</readerID>
 | 
			
		||||
        </book>
 | 
			
		||||
        <book>
 | 
			
		||||
            <bookID>9556</bookID>
 | 
			
		||||
            <title>Romeo and Juliet</title>
 | 
			
		||||
        </book>
 | 
			
		||||
    </bookList>
 | 
			
		||||
</library>
 | 
			
		||||
@@ -1,7 +1,4 @@
 | 
			
		||||
declare namespace p="http://www.release11.com/person";
 | 
			
		||||
declare namespace b="http://www.release11.com/book";
 | 
			
		||||
declare namespace l="http://www.release11.com/library";
 | 
			
		||||
declare default element namespace "http://www.tibco.com/schemas/Shemy4tools/Folder/Schema.xsd";
 | 
			
		||||
| 
					
	
	
	
	
	
	
	
	 | 
			||||
 | 
			
		||||
 | 
			
		||||
for $x in //p:person
 | 
			
		||||
return string($x/p:name)
 | 
			
		||||
for $x in /root/UserList[@Id = 'a']/User
 | 
			
		||||
return string($x/Name)
 | 
			
		||||
@@ -1,33 +1,62 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<l:library xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.release11.com" xmlns:l="http://www.release11.com/library" xmlns:p="http://www.release11.com/person" xmlns:b="http://www.release11.com/book">
 | 
			
		||||
    <l:libraryName>City library</l:libraryName>
 | 
			
		||||
    <l:libraryID>345123</l:libraryID>
 | 
			
		||||
    <l:readerList>
 | 
			
		||||
        <p:person>
 | 
			
		||||
            <p:readerID>7321</p:readerID>
 | 
			
		||||
            <p:name>Adam</p:name>
 | 
			
		||||
            <p:surname>Choke</p:surname>
 | 
			
		||||
        </p:person>
 | 
			
		||||
        <p:person>
 | 
			
		||||
            <p:readerID>5123</p:readerID>
 | 
			
		||||
            <p:name>Lauren</p:name>
 | 
			
		||||
            <p:surname>Wong</p:surname>
 | 
			
		||||
        </p:person>
 | 
			
		||||
    </l:readerList>
 | 
			
		||||
    <l:bookList>
 | 
			
		||||
        <b:book>
 | 
			
		||||
            <b:bookID>6422</b:bookID>
 | 
			
		||||
            <b:title>Harry Potter</b:title>
 | 
			
		||||
            <p:readerID>7542</p:readerID>
 | 
			
		||||
        </b:book>
 | 
			
		||||
        <b:book>
 | 
			
		||||
            <b:bookID>1234</b:bookID>
 | 
			
		||||
            <b:title>Macbeth</b:title>
 | 
			
		||||
            <p:readerID>5123</p:readerID>
 | 
			
		||||
        </b:book>
 | 
			
		||||
        <b:book>
 | 
			
		||||
            <b:bookID>9556</b:bookID>
 | 
			
		||||
            <b:title>Romeo and Juliet</b:title>
 | 
			
		||||
        </b:book>
 | 
			
		||||
    </l:bookList>
 | 
			
		||||
</l:library>
 | 
			
		||||
<?xml version = "1.0" encoding = "UTF-8"?>
 | 
			
		||||
<root xmlns = "http://www.tibco.com/schemas/Shemy4tools/Folder/Schema.xsd" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "http://www.tibco.com/schemas/Shemy4tools/Folder/Schema.xsd Schema4tools.xsd">
 | 
			
		||||
	<UserList Id = "a">
 | 
			
		||||
		<User Id = "1">
 | 
			
		||||
			<Name>John</Name>
 | 
			
		||||
			<Surname>Wick</Surname>
 | 
			
		||||
			<DateOfDeath>2023-10-10</DateOfDeath>
 | 
			
		||||
		</User>
 | 
			
		||||
		<User Id = "2">
 | 
			
		||||
			<Name>Martha</Name>
 | 
			
		||||
			<Surname>Whane</Surname>
 | 
			
		||||
			<DateOfDeath>1970-06-13</DateOfDeath>
 | 
			
		||||
		</User>
 | 
			
		||||
		<User Id = "3">
 | 
			
		||||
			<Name>Bruce</Name>
 | 
			
		||||
			<Surname>Lee</Surname>
 | 
			
		||||
			<DateOfDeath>1985-01-24</DateOfDeath>
 | 
			
		||||
		</User>
 | 
			
		||||
		<User Id = "4">
 | 
			
		||||
			<Name>John</Name>
 | 
			
		||||
			<Surname>Rambo</Surname>
 | 
			
		||||
			<DateOfDeath>2024-06-19</DateOfDeath>
 | 
			
		||||
		</User>
 | 
			
		||||
		<NameList>FirstList</NameList>
 | 
			
		||||
	</UserList>
 | 
			
		||||
	<UserList Id = "b">
 | 
			
		||||
		<User Id = "1">
 | 
			
		||||
			<Name>Jack</Name>
 | 
			
		||||
			<Surname>Wicker</Surname>
 | 
			
		||||
			<DateOfDeath>2023-10-10</DateOfDeath>
 | 
			
		||||
		</User>
 | 
			
		||||
		<NameList>SecondList</NameList>
 | 
			
		||||
	</UserList>
 | 
			
		||||
	<UserList Id = "c">
 | 
			
		||||
		<User Id = "1">
 | 
			
		||||
			<Name>New</Name>
 | 
			
		||||
			<Surname>Folder</Surname>
 | 
			
		||||
			<DateOfDeath>2023-11-10</DateOfDeath>
 | 
			
		||||
		</User>
 | 
			
		||||
		<User Id = "2">
 | 
			
		||||
			<Name>Newer</Name>
 | 
			
		||||
			<Surname>Folder</Surname>
 | 
			
		||||
			<DateOfDeath>2023-11-11</DateOfDeath>
 | 
			
		||||
		</User>
 | 
			
		||||
		<User Id = "3">
 | 
			
		||||
			<Name>Newest</Name>
 | 
			
		||||
			<Surname>Folder</Surname>
 | 
			
		||||
			<DateOfDeath>2023-11-12</DateOfDeath>
 | 
			
		||||
		</User>
 | 
			
		||||
		<User Id = "4">
 | 
			
		||||
			<Name>New</Name>
 | 
			
		||||
			<Surname>Folder2</Surname>
 | 
			
		||||
			<DateOfDeath>2023-11-13</DateOfDeath>
 | 
			
		||||
		</User>
 | 
			
		||||
		<User Id = "5">
 | 
			
		||||
			<Name>New</Name>
 | 
			
		||||
			<Surname>Folder-Final</Surname>
 | 
			
		||||
			<DateOfDeath>2023-11-14</DateOfDeath>
 | 
			
		||||
		</User>
 | 
			
		||||
		<NameList>ThirdList</NameList>
 | 
			
		||||
	</UserList>
 | 
			
		||||
</root>
 | 
			
		||||
@@ -1,42 +1,41 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 | 
			
		||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
 | 
			
		||||
  targetNamespace="">
 | 
			
		||||
  <xsd:element name="library">
 | 
			
		||||
    <xsd:complexType mixed="true">
 | 
			
		||||
      <xsd:sequence>
 | 
			
		||||
        <xsd:element minOccurs="0" name="libraryName" type="xsd:string" />
 | 
			
		||||
        <xsd:element minOccurs="0" name="libraryID" type="xsd:int" />
 | 
			
		||||
        <xsd:element minOccurs="0" name="readerList">
 | 
			
		||||
          <xsd:complexType mixed="true">
 | 
			
		||||
            <xsd:sequence>
 | 
			
		||||
              <xsd:element maxOccurs="unbounded" name="person">
 | 
			
		||||
                <xsd:complexType mixed="true">
 | 
			
		||||
                  <xsd:sequence>
 | 
			
		||||
                    <xsd:element minOccurs="0" name="readerID" type="xsd:int" />
 | 
			
		||||
                    <xsd:element minOccurs="0" name="name" type="xsd:normalizedString" />
 | 
			
		||||
                    <xsd:element minOccurs="0" name="surname" type="xsd:normalizedString" />
 | 
			
		||||
                  </xsd:sequence>
 | 
			
		||||
                </xsd:complexType>
 | 
			
		||||
              </xsd:element>
 | 
			
		||||
            </xsd:sequence>
 | 
			
		||||
          </xsd:complexType>
 | 
			
		||||
        </xsd:element>
 | 
			
		||||
        <xsd:element minOccurs="0" name="bookList">
 | 
			
		||||
          <xsd:complexType mixed="true">
 | 
			
		||||
            <xsd:sequence>
 | 
			
		||||
              <xsd:element maxOccurs="unbounded" name="book">
 | 
			
		||||
                <xsd:complexType mixed="true">
 | 
			
		||||
                  <xsd:sequence>
 | 
			
		||||
                    <xsd:element minOccurs="0" name="bookID" type="xsd:int" />
 | 
			
		||||
                    <xsd:element minOccurs="0" name="title" type="xsd:string" />
 | 
			
		||||
                    <xsd:element minOccurs="0" name="readerID" type="xsd:int" />
 | 
			
		||||
                  </xsd:sequence>
 | 
			
		||||
                </xsd:complexType>
 | 
			
		||||
              </xsd:element>
 | 
			
		||||
            </xsd:sequence>
 | 
			
		||||
          </xsd:complexType>
 | 
			
		||||
        </xsd:element>
 | 
			
		||||
      </xsd:sequence>
 | 
			
		||||
    </xsd:complexType>
 | 
			
		||||
  </xsd:element>
 | 
			
		||||
</xsd:schema>
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
 | 
			
		||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
 | 
			
		||||
	 xmlns="http://www.tibco.com/schemas/Shemy4tools/Folder/Schema.xsd"
 | 
			
		||||
	 targetNamespace="http://www.tibco.com/schemas/Shemy4tools/Folder/Schema.xsd"
 | 
			
		||||
	 elementFormDefault="qualified"
 | 
			
		||||
	 attributeFormDefault="unqualified">
 | 
			
		||||
	<xs:element name="root">
 | 
			
		||||
		<xs:complexType>
 | 
			
		||||
			<xs:sequence>
 | 
			
		||||
				<xs:element ref="UserList" maxOccurs="unbounded"/>
 | 
			
		||||
			</xs:sequence>
 | 
			
		||||
		</xs:complexType>
 | 
			
		||||
	</xs:element>
 | 
			
		||||
	<xs:element name="UserList">
 | 
			
		||||
		<xs:complexType mixed="true">
 | 
			
		||||
			<xs:sequence>
 | 
			
		||||
				<xs:element ref="User" maxOccurs="unbounded"/>
 | 
			
		||||
				<xs:element ref="NameList"/>
 | 
			
		||||
			</xs:sequence>
 | 
			
		||||
			<xs:attribute name="Id" type="xs:string" use="required"/>
 | 
			
		||||
		</xs:complexType>
 | 
			
		||||
	</xs:element>
 | 
			
		||||
	<xs:simpleType name="User">
 | 
			
		||||
		<xs:restriction base="xs:string"/>
 | 
			
		||||
	</xs:simpleType>
 | 
			
		||||
	<xs:element name="User">
 | 
			
		||||
		<xs:complexType>
 | 
			
		||||
			<xs:sequence>
 | 
			
		||||
				<xs:element ref="Name"/>
 | 
			
		||||
				<xs:element ref="Surname"/>
 | 
			
		||||
				<xs:element ref="DateOfDeath"/>
 | 
			
		||||
			</xs:sequence>
 | 
			
		||||
			<xs:attribute name="Id" type="xs:int" use="required"/>
 | 
			
		||||
		</xs:complexType>
 | 
			
		||||
	</xs:element>
 | 
			
		||||
	<xs:element name="Name" type="xs:string"/>
 | 
			
		||||
	<xs:element name="Surname" type="xs:string"/>
 | 
			
		||||
	<xs:element name="DateOfDeath" type="xs:date"/>
 | 
			
		||||
	<xs:element name="NameList" type="xs:string"/>
 | 
			
		||||
</xs:schema>
 | 
			
		||||
@@ -1,14 +1,16 @@
 | 
			
		||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 | 
			
		||||
    xmlns:b="http://www.release11.com/book" xmlns:p="http://www.release11.com/person"
 | 
			
		||||
    xmlns:l="http://www.release11.com/library">
 | 
			
		||||
<xsl:stylesheet version="1.0" xmlns:u = "http://www.tibco.com/schemas/Shemy4tools/Folder/Schema.xsd"
 | 
			
		||||
                              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 | 
			
		||||
    <xsl:template match="/">
 | 
			
		||||
        <Library>
 | 
			
		||||
            <ReaderCount>
 | 
			
		||||
                <xsl:value-of select="count(//p:person)" />
 | 
			
		||||
            </ReaderCount>
 | 
			
		||||
            <BookCount>
 | 
			
		||||
                <xsl:value-of select="count(/l:library/l:bookList/b:book)" />
 | 
			
		||||
            </BookCount>
 | 
			
		||||
        </Library>
 | 
			
		||||
        <UserLists>
 | 
			
		||||
            <UserListCount>
 | 
			
		||||
                <xsl:value-of select="count(/u:root/u:UserList)" />
 | 
			
		||||
            </UserListCount>
 | 
			
		||||
            <xsl:for-each select="/u:root/u:UserList">
 | 
			
		||||
                <UserListStats>
 | 
			
		||||
                    <Name><xsl:value-of select="u:NameList" /></Name>
 | 
			
		||||
                    <UserCount><xsl:value-of select="count(u:User)" /></UserCount>
 | 
			
		||||
                </UserListStats>
 | 
			
		||||
            </xsl:for-each>
 | 
			
		||||
        </UserLists>
 | 
			
		||||
    </xsl:template>
 | 
			
		||||
</xsl:stylesheet>
 | 
			
		||||
@@ -18,7 +18,7 @@ function setDefault() {
 | 
			
		||||
    const emitName = "update:defaultData";
 | 
			
		||||
    switch (props.prettyName.toLowerCase()) {
 | 
			
		||||
        case "xpath":
 | 
			
		||||
            emit(emitName, "string(/l:library/l:libraryName)")
 | 
			
		||||
            emit(emitName, "/root/UserList/User[../NameList = 'FirstList']")
 | 
			
		||||
            break;
 | 
			
		||||
        case "xsd":
 | 
			
		||||
            emit(emitName, sampleXSD)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user
	
Try to get rid of these "tibco" watermark