Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Perl module for RELAX NG?

by SheridanCat (Pilgrim)
on Dec 05, 2006 at 17:23 UTC ( #587920=note: print w/ replies, xml ) Need Help??


in reply to Perl module for RELAX NG?

My only other question is whether this notation could be extended (if it doesn't allow it already) to include not just a schema but the data inside it. My guess is it would then look a bit like a data structure serialized into perl..

RELAX NG is just the grammar, right? It just describes the structure and content of an XML file. Putting data into it seems weird. Correct me if I'm wrong, I only started looking at RELAX NG over the past week or so.

And doing serialization in XML seems like overkill to me. We already have YAML if you want portable and human-readable serialization. But, of course, there is more than one way to do it.


Comment on Re: Perl module for RELAX NG?
Re^2: Perl module for RELAX NG?
by mattr (Curate) on Dec 06, 2006 at 10:41 UTC
    Yes, you are right of course. I initially was mixed up over whether this was a replacement for just the schema definition or for XML itself too. I also thought YAML would be the choice then but RELAX seems to borrow from regular expressions which is nice, and I don't quite see how to link various YAML documents in a YAML stream to a RELAX definition.

    Actually I was most impressed that there are java tools that will generate classes based on RELAX NG definitions. Which made me think RELAX-like language might be very nice as a way to quickly define lots of things, like classes, db schemas, business logic, etc. I have to study it more to really understand how far it goes though. There are so many meta description languages out now for small domains so I had a hope. Not too long ago I was looking at some of the modules that help you design classes quickly in Perl but every module has its pros and cons of course. Thank you and all other posters.

      <shameless-plug> If you want a schema language for data structures written in a data structure, then take a look at Kwalify. Note that you can replace "data structure" in the above sentence by YAML file, JSON data, Data::Dumper dump or anything else dealing with (Perl) data structures.</shameless-plug>
        Thanks! This looks like it could come in handy..

        Matt

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://587920]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2014-09-16 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (33 votes), past polls