Ambrosia
view release on metacpan or search on metacpan
share/Managers/buildApp.pm view on Meta::CPAN
$self->parser = XML::LibXML->new();
$self->xslt = XML::LibXSLT->new();
my $source = $self->source = $self->parser->parse_file(Context->param('data'));
$self->application = ($source->getElementsByTagName('Application'))[0]->cloneNode(0);
$self->application->addChild(($source->getElementsByTagName('Config'))[0]->cloneNode(1));
$self->application->addChild(($source->getElementsByTagName('DataSource'))[0]->cloneNode(1));
$self->application->addChild(($source->getElementsByTagName('Relations'))[0]->cloneNode(1));
$self->application->addChild(($source->getElementsByTagName('MenuGroups'))[0]->cloneNode(1));
}
our $encoding;
sub prepare
{
my $self = shift;
return unless $self->validateDocument();
share/Templates/Templates/XSLT+DOJO/main.xsl view on Meta::CPAN
a {color:#408DD2;}
</style>
</head>
<body class="claro">
<div class="head">
<xsl:text disable-output-escaping="yes">&nbsp;&nbsp;</xsl:text><b><xslt:value-of select="/atns:Application/@Label"/></b>
</div>
<div id="appLayout" class="demoLayout" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design: 'headline'">
<div id="leftCol" class="leftCol" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'left', splitter: true"><div style="width: 100%;height:50%;">
<xslt:apply-templates select="/atns:Application/atns:MenuGroups" />
<a>
<xsl:attribute name="href">
<xsl:value-of>
<xslt:attribute name="select"><xslt:value-of select="concat('concat(', $UcAppName, '/@script', ',', $s_q, '/?action=/exit', $s_q, ')')" /></xslt:attribute>
</xsl:value-of>
</xsl:attribute>Logout</a><br />
</div></div>
<div class="centerPanel" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center'">
<iframe name="mainFrame" style="width:100%; height:99%; border:0px;"></iframe>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
</xslt:template>
<xslt:template match="/atns:Application/atns:MenuGroups">
<div dojoType="dijit.layout.AccordionContainer" style="height: 300px;">
<xslt:apply-templates select="atns:Group" />
</div>
</xslt:template>
<xslt:template match="atns:Group">
<div data-dojo-type="dijit.layout.ContentPane">
<xslt:attribute name="title"><xslt:value-of select="@Title" /></xslt:attribute>
<xslt:apply-templates select="atns:EntityRef" />
</div>
share/Templates/db2xml.xsl view on Meta::CPAN
<Entitys>
<xsl:apply-templates select="//repository/schema_list/tables" mode="entity" />
</Entitys>
<Relations>
<xsl:apply-templates select="//repository/schema_list/tables[boolean(has_one)]" mode="relation" />
</Relations>
<MenuGroups>
<Group Name="" Title="">
<xsl:attribute name="Name">
<xsl:value-of select="name()" /><!-- name of root element. (config->ID) -->
</xsl:attribute>
<xsl:attribute name="Title">
<xsl:value-of select="//repository/config/@label" /><!-- config->Label -->
</xsl:attribute>
<xsl:apply-templates select="//repository/schema_list/tables" mode="menugroups" />
</Group>
</MenuGroups>
</Application>
</xsl:template>
<!-- Create DataSource's list -->
<xsl:template match="//repository/schema_list" mode="DataSource">
<Type>
<xsl:attribute name="Name">
<xsl:value-of select="@type" />
</xsl:attribute>
<Source>
share/XSD/AmbrosiaDL.xsd view on Meta::CPAN
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- end of DataSource -->
<xs:element ref="atns:Entitys"/>
<xs:element ref="atns:Relations"/>
<xs:element name="MenuGroups">
<xs:complexType>
<xs:sequence>
<xs:element name="Group" type="atns:Group" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Name" use="required" type="xs:NCName"/>
<xs:attribute name="Label" use="optional" type="xs:string"/>
<xs:attribute name="Charset" use="optional" type="xs:NCName" default="utf-8"/>
share/XSD/AmbrosiaDL.xsd view on Meta::CPAN
<xs:selector xpath="atns:Relations/atns:Relation"/>
<xs:field xpath="@RefId"/>
</xs:keyref>
<xs:keyref name="fk_RelationEntityRef" refer="atns:PKEntity">
<xs:selector xpath="atns:Relations/atns:Relation/atns:EntityRef"/>
<xs:field xpath="@RefId"/>
</xs:keyref>
<xs:keyref name="fk_GroupEntity" refer="atns:PKEntity">
<xs:selector xpath="atns:MenuGroups/atns:Group"/>
<xs:field xpath="@RefId"/>
</xs:keyref>
</xs:element>
<xs:element name="Relations">
<xs:complexType>
<xs:sequence>
<xs:element name="Relation" type="atns:Relation" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
( run in 0.711 second using v1.01-cache-2.11-cpan-49f99fa48dc )