Query on YAPP Usage

<[email protected]> Wed, 22 Aug 2007 18:15:08 +0530
Newsgroups gmane.text.xml.o-xml
Message-ID <[email protected]>
This is a multi-part message in MIME format.

--===============1812518238==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C7E4BA.C48A4E05"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C7E4BA.C48A4E05
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable


=20

Hi,

=20

We have a query on YAPP usage.=20

=20

A brief about our requirement:=20

A BNF rule has to be used to validate a data to see whether it is as per
that BNF rule. (Assume 3.45 (data) is according to BNF rule say Fraction
Number)

=20

Our understanding about YAPP:

We understand from the document available @ http://www.o-xml.org/yapp/
that YAPP can be used to convert a BNF rule into XML and XSLT, and it
also says that the parser can be called using the call-template from
another xsl stylesheet.

=20

=20

We have added a small BNF Rule to the existing xpath-grammar.bnf under
<bnf> element as below.=20

=20

number ::=3D [.0123456789];=20

Expression ::=3D AdditiveExpression end;=20

AdditiveExpression ::=3D number | AdditiveExpression minus number |
AdditiveExpression plus number;=20

=20

=20

After giving make, we see a <xsl:template name=3D"p:AdditiveExpression">
.. .. ..  .. </xsl:template> in the bnf-parser.xsl file.=20

=20

=20

When we tried calling this name template through an outsider xsl
stylesheet we are getting compilation issue.=20

=20

Pls help us to know if our understanding about YAPP is correct or not
and how to use the bnf-parser.xsl file. Also, it would be great for us
if we are provided with YAPP detailed documentation or any user guide to
understand it's specifications & usage thoroughly.

 =20

=20

=20

Below is the snapshot of our xsl style sheet.

=20

<xsl:template match=3D"/">

.

.

<xsl:call-template name=3D"p:Expression">=20

<xsl:with-param name=3D"in" select=3D"'123 + 456 - 789'"/>=20

</xsl:call-template>

.

.

</xsl:template>

=20

=20

Any sort of help would be highly appreciated.

=20

=20

Thanks & Regards,

Pnvd Sudhir=20

=20




The information contained in this electronic message and any attachments to=
 this message are intended for the exclusive use of the addressee(s) and=
 may contain proprietary, confidential or privileged information. If you=
 are not the intended recipient, you should not disseminate, distribute or=
 copy this e-mail. Please notify the sender immediately and destroy all=
 copies of this message and any attachments.=20

WARNING: Computer viruses can be transmitted via email. The recipient=
 should check this email and any attachments for the presence of viruses.=
 The company accepts no liability for any damage caused by any virus=
 transmitted by this email.
=20
www.wipro.com
------_=_NextPart_001_01C7E4BA.C48A4E05
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=
=3D"urn:schemas-microsoft-com:office:word" xmlns=
=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
h2
	{mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:18.0pt;
	font-family:"Times New Roman";
	font-weight:bold;}
h3
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	page-break-after:avoid;
	font-size:13.0pt;
	font-family:Arial;
	font-weight:bold;}
h4
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	page-break-after:avoid;
	font-size:14.0pt;
	font-family:"Times New Roman";
	font-weight:bold;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
p
	{mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman";}
code
	{font-family:"Courier New";}
tt
	{font-family:"Courier New";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>We have a query on YAPP usage.=
 <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><b><i><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial;font-weight:bold;font-style:italic'>A brief about our
requirement: <o:p></o:p></span></font></i></b></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>A BNF rule has to be used to validate a data to see=
 whether
it is as per that BNF rule. (Assume <b><i><span style=3D'font-weight:bold;
font-style:italic'>3.45 </span></i></b>(data) is according to BNF rule say=
 <b><i><span
style=3D'font-weight:bold;font-style:italic'>Fraction=
 Number</span></i></b>)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><b><i><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial;font-weight:bold;font-style:italic'>Our understanding=
 about
YAPP:<o:p></o:p></span></font></i></b></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>We understand from the document available @ <a
href=3D"http://www.o-xml.org/yapp/">http://www.o-xml.org/yapp/</a> that=
 YAPP can
be used to convert a BNF rule into XML and XSLT, and it also says that the
parser can be called using the call-template from another xsl=
 stylesheet.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>We have added a small BNF Rule to the existing=
 xpath-grammar.bnf
under &lt;bnf&gt; element as below. <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><code><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:11.0pt'>number ::=3D [.0123456789];=
 <o:p></o:p></span></font></code></p>

<p class=3DMsoNormal><code><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:11.0pt'>Expression ::=3D AdditiveExpression end;=
 <o:p></o:p></span></font></code></p>

<p class=3DMsoNormal><code><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:11.0pt'>AdditiveExpression ::=3D number |=
 AdditiveExpression
minus number | AdditiveExpression plus number; </span></font></code><font
size=3D2><span style=3D'font-size:11.0pt'><o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>After giving make, we see a <b><span style=
=3D'font-weight:
bold'>&lt;xsl:template name=3D&quot;p:AdditiveExpression&quot;&gt; .. .. ..=
 &nbsp;..</span></b>
<b><span style=3D'font-weight:bold'>&lt;/xsl:template&gt;</span></b> in the=
 <b><span
style=3D'font-weight:bold'>bnf-parser.xsl</span></b> file.=
 <o:p></o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>When we tried calling this name template through an=
 outsider
xsl stylesheet we are getting <b><span style=
=3D'font-weight:bold'>compilation
issue</span></b>. <o:p></o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>Pls help us to know if our understanding about YAPP is
correct or not and how to use the <b><span style=
=3D'font-weight:bold'>bnf-parser.xsl
</span></b>file. Also, it would be great for us if we are provided with=
 YAPP detailed
documentation or any user guide to understand it&#8217;s specifications=
 &amp;
usage thoroughly.<o:p></o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoAutoSig><code><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></code></p>

<p class=3DMsoAutoSig><code><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></code></p>

<p class=3DMsoAutoSig><code><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt'>Below is the snapshot of our xsl style=
 sheet.<o:p></o:p></span></font></code></p>

<p class=3DMsoAutoSig><code><b><font size=3D2 face=3D"Courier New"><span
style=
=3D'font-size:10.0pt;font-weight:bold'><o:p>&nbsp;</o:p></span></font></b><=
/code></p>

<p class=3DMsoAutoSig><code><b><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-weight:bold'>&lt;xsl:template match=
=3D&#8221;/&#8221;&gt;<o:p></o:p></span></font></b></code></p>

<p class=3DMsoAutoSig><code><b><font size=3D2 face=3D"Courier New"><span
style=
=3D'font-size:10.0pt;font-weight:bold'>.<o:p></o:p></span></font></b></code=
></p>

<p class=3DMsoAutoSig><code><b><font size=3D2 face=3D"Courier New"><span
style=
=3D'font-size:10.0pt;font-weight:bold'>.<o:p></o:p></span></font></b></code=
></p>

<p class=3DMsoAutoSig><code><b><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-weight:bold'>&lt;xsl:call-template
name=3D&quot;p:Expression&quot;&gt;=
 <o:p></o:p></span></font></b></code></p>

<p class=3DMsoAutoSig><code><b><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-weight:bold'>&lt;xsl:with-param
name=3D&quot;in&quot; select=3D&quot;'123 + 456 - 789'&quot;/&gt;=
 <o:p></o:p></span></font></b></code></p>

<p class=3DMsoAutoSig><code><b><font size=3D2 face=3D"Courier New"><span
style=
=3D'font-size:10.0pt;font-weight:bold'>&lt;/xsl:call-template&gt;</span></f=
ont></b></code><b><font
size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;font-family:Arial;font-weight:
bold'><o:p></o:p></span></font></b></p>

<p class=3DMsoAutoSig><b><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial;font-weight:bold'>.<o:p></o:p></span></font></b></p>

<p class=3DMsoAutoSig><b><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial;font-weight:bold'>.<o:p></o:p></span></font></b></p>

<p class=3DMsoAutoSig><b><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial;font-weight:bold'>&lt;/xsl:template&gt;<o:p></o:p></span>=
</font></b></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>Any sort of help would be highly=
 appreciated.<o:p></o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>Thanks &amp; Regards,<o:p></o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 face=3DArial><span style=
=3D'font-size:10.0pt;
font-family:Arial'>Pnvd Sudhir </span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=
=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>

<table><tr><td bgcolor=3D#ffffff><font color=3D#000000><br>
The information contained in this electronic message and any attachments to=
 this message are intended for the exclusive use of the addressee(s) and=
 may contain proprietary, confidential or privileged information. If you=
 are not the intended recipient, you should not disseminate, distribute or=
 copy this e-mail. Please notify the sender immediately and destroy all=
 copies of this message and any attachments. <br>
<br>
WARNING: Computer viruses can be transmitted via email. The recipient=
 should check this email and any attachments for the presence of viruses.=
 The company accepts no liability for any damage caused by any virus=
 transmitted by this email.<br>
 <br>
www.wipro.com<br>
</font></td></tr></table>
------_=_NextPart_001_01C7E4BA.C48A4E05--

--===============1812518238==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
o-xml mailing list
o-xml-zRfLyl9bSvv/[email protected]
http://lists.pingdynasty.com/mailman/listinfo/o-xml

--===============1812518238==--