XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Which latest and greatest XML Standards Should I UseFor XML-Grammar-Fortune?

Hi Dan,

you sent this message to me alone, without saying it was intended to only be
private (and without it appearing to be something that needs to be private) so
I'm CCing my reply to the list.

On Tue, 13 Nov 2012 11:04:36 -0800
dvint@dvint.com wrote:

> > Hi all,
> >
> > I have defined an XML grammar titled XML-Grammar-Fortune (see
> > http://web-cpan.shlomifish.org/modules/XML-Grammar-Fortune/ ), which I use
> > to
> > mark up UNIX-like fortune cookies and quotations (see
> > http://www.shlomifish.org/humour/fortunes/ for examples and resultant
> > XHTML and
> > plain text outputs), and which is based on XML.
> >
> > Now, I have considered modernising the grammar somewhat and possibly
> > incorporate the following elements:
> >
> > 1. Using xml:id instead of a plain "id=""" attribute as well as xml:lang
> > and
> > other xml: standard attributes.
> 
> I would use xml:lang if you plan on using any language based differences.
> xml:id I believe is only useful/needed if you are not processing with a
> schema or DTD. I've never had a use for it.
> 

Can anyone confirm that? I am using a RELAX NG schema for them.

> >
> > 2. Making a judicious use of XML namespaces. Right now the
> > <screenplay>-typed
> > tags were done in a hackish way by copy-pasting the RELAX NGs and XSLTs
> > contents
> > http://www.shlomifish.org/open-source/projects/XML-Grammar/Fiction/ , but
> > they
> > may be better doable using namespaces. One thing that worries me is
> > whether
> > I'll need to do sometihng like xmlns="[LONG URL HERE]" everytime I want to
> > use
> > them.
> 
> Probably depends upon the tool/language. Typically you enter that URL once
> and create a prefix for it. So long URL goes to "sp" for instance.

Yes.

> 
> >
> > 3. I have defined well-formed plaintext grammars for XML-Grammar-Fiction
> > and
> > XML-Grammar-Screenplay (see the above link), which gets translated to the
> > custom XML grammars (and from there to other XMLs using XSLT), and I
> > wonder
> > whether I can do the same for XML-Grammar-Fortune. Is there a good tool
> > for
> > doing something like that with ease?
> >
> > 4. Should I use XSLT 2.0 and/or XPath 2.0? Right now I prefer to use Perl
> > 5
> > with the XML::LibXSLT CPAN module that is in turn based on libxslt from
> > the
> > GNOME project, and from what I know, the only full open-source XSLT 2.0
> > implementation is Saxon, which is written in Java. There's
> > https://metacpan.org/module/Inline::Java but it may not work well (have
> > not
> > tried).
> 
> 
> Depends upon the type of processing you are are trying to do and the
> environment. I prefer XSLT (any flavor) over using a profgramming language
> if all I'm doing is transformations or mining data. I'll then wrap a
> simple script around that to handle any arguments or file manipulation (if
> needed).

OK. Just note that I already have an XSLT stylesheet, but it's XSLT 1.0.

> 
> 
> >
> > 5. Perhaps create XSLT stylesheets to translate the fortune cookies to TEI
> > and/or XSL-FO.
> 
> You could, you don't really say why you are doing any of this or what the
> required output is to be. Not sure why you would want to or need to go
> through TEI.

TEI can be used to convert to many other formats, in a similar fashion to
DocBook/XML (only with support for more general documents).

Regards,

	Shlomi Fish 


> 
> ..dan
> 
> 
> >
> > =============
> >
> > Does anyone have any other ideas or can comment on what I said here? Am I
> > missing anything?
> >
> > Regards,
> >
> > 	Shlomi Fish
> >
> > --
> > -----------------------------------------------------------------
> > Shlomi Fish       http://www.shlomifish.org/
> > Chuck Norris/etc. Facts - http://www.shlomifish.org/humour/bits/facts/
> >
> > Chuck Norris doesn’t make mistakes. (Suâ€_Shee) He corrects God. (Shlomi
> > Fish)
> >
> > Please reply to list if it's a mailing list post - http://shlom.in/reply .
> >
> > _______________________________________________________________________
> >
> > XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> > to support XML implementation and development. To minimize
> > spam in the archives, you must subscribe before posting.
> >
> > [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> > Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> > subscribe: xml-dev-subscribe@lists.xml.org
> > List archive: http://lists.xml.org/archives/xml-dev/
> > List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
> >
> >
> 
> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://shlom.in/sussman

I’d love to change the world, but they won’t give me the source code.
    — Unknown

Please reply to list if it's a mailing list post - http://shlom.in/reply .


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS