Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform XML to State Decoded format #3

Open
waldoj opened this issue Apr 5, 2013 · 5 comments
Open

Transform XML to State Decoded format #3

waldoj opened this issue Apr 5, 2013 · 5 comments

Comments

@waldoj
Copy link

waldoj commented Apr 5, 2013

The easiest path to having the laws ingested by The State Decoded is to convert the XML—presumably via XSLT—to the State Decoded XML format, which is schema-less and pretty straightforward.

@tmcw
Copy link
Contributor

tmcw commented Apr 5, 2013

Right now the XML is just XMLized HTML - there's be a bonus parse step before we get to 'semantic' XML, and that'll be the State Decoded format.

@waldoj
Copy link
Author

waldoj commented Apr 5, 2013

I hadn't even looked at the XML—I was wondering how in the world you managed to turn the HTML into XML so quickly. :)

@tmcw
Copy link
Contributor

tmcw commented Apr 5, 2013

The JSON is slightly more semantic - parse.js has an initial shot at a regex for identifying section starts & such.

@ghost ghost assigned tmcw Apr 5, 2013
@tmcw
Copy link
Contributor

tmcw commented Apr 5, 2013

@waldoj does the state decoded handle CDATA sections correctly? Right now hacking together some XML output (example, early and needs work) and deciding whether to XML-escape or CDATA-wrap sections with &s.

@waldoj
Copy link
Author

waldoj commented Apr 5, 2013

I don't know—I've never tried it! The XML is being handled with SimpleXMLElement, which theoretically handles CDATA properly. I escaped ampersands in my testing, though, having not considered that wrapping the content in a CDATA container would have accomplished the same thing.

@tmcw tmcw removed their assignment Nov 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants